-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (84 loc) · 2.88 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Build and Push
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
tag:
description: 'Tag to build and push'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build base image
id: build-and-push-base
uses: docker/build-push-action@v6
with:
context: ./base
platforms: linux/amd64,linux/arm64
push: true
tags: |
iconcommunity/relay-base:latest
iconcommunity/relay-base:${{ inputs.tag }}
- name: Build relayer image
id: build-and-push-relayer
uses: docker/build-push-action@v6
with:
context: ./relayer
platforms: linux/amd64,linux/arm64
push: true
tags: |
iconcommunity/centralized-relay:latest
iconcommunity/centralized-relay:${{ inputs.tag }}
- name: Build nginx image
id: build-and-push-admin-dashboard
uses: docker/build-push-action@v6
with:
context: ./admin-dashboard
platforms: linux/amd64,linux/arm64
push: true
tags: |
iconcommunity/relayer-admin-dashboard:latest
iconcommunity/relayer-admin-dashboard:${{ inputs.tag }}
- name: Sign base image
uses: ./.github/workflows/sign-image.yml
with:
tags: "iconcommunity/relay-base:latest iconcommunity/relay-base:${{ inputs.tag }}"
digest: ${{ steps.build-and-push-base.outputs.digest }}
- name: Sign relayer image
uses: ./.github/workflows/sign-image.yml
with:
tags: "iconcommunity/centralized-relay:latest iconcommunity/centralized-relay:${{ inputs.tag }}"
digest: ${{ steps.build-and-push-relayer.outputs.digest }}
- name: Sign nginx image
uses: ./.github/workflows/sign-image.yml
with:
tags: "iconcommunity/relayer-admin-dashboard:latest iconcommunity/relayer-admin-dashboard:${{ env.TAG_NAME }}"
digest: ${{ steps.build-and-push-admin-dashboard.outputs.digest }}
- name: Create a release
uses: softprops/action-gh-release@v2
with:
files: |
./base/Dockerfile
./relayer/Dockerfile
./admin-dashboard/Dockerfile
./docker-compose.yaml
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ inputs.tag }}
make_latest: true
generate_release_notes: true