@@ -118,114 +118,12 @@ jobs:
118118 if-no-files-found : error
119119 retention-days : 1
120120
121- build-arm :
122- runs-on : ubuntu-24.04-arm
123- if : ${{ github.actor != 'dependabot[bot]' }}
124- strategy :
125- fail-fast : false
126- matrix :
127- # we keep this just in case we need to change
128- platform : ${{ github.event_name == 'pull_request' && fromJSON('["linux/arm64"]') || fromJSON('["linux/arm64"]') }}
129- steps :
130- - name : Prepare
131- run : |
132- platform=${{ matrix.platform }}
133- echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
134- - name : Checkout
135- uses : actions/checkout@v6
136- - name : Set up QEMU
137- uses : docker/setup-qemu-action@v3
138- with :
139- platforms : ${{ matrix.platform }}
140- # image: tonistiigi/binfmt:qemu-v8.0.4
141- - name : Set up Docker Buildx
142- id : buildx
143- uses : docker/setup-buildx-action@v3
144- with :
145- platforms : ${{ matrix.platform }}
146- - name : Login to Docker Hub
147- id : dockerhub_login
148- env :
149- DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_PUSH_USERNAME }}
150- DOCKERHUB_TOKEN : ${{ secrets.DOCKER_PUSH_TOKEN }}
151- if : env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != ''
152- uses : docker/login-action@v3
153- with :
154- username : ${{ secrets.DOCKERHUB_PUSH_USERNAME }}
155- password : ${{ secrets.DOCKER_PUSH_TOKEN }}
156- - name : Login to GitHub Container Registry
157- id : ghcr_login
158- env :
159- GHCR_PUSH_TOKEN : ${{ secrets.GHCR_PUSH_TOKEN }}
160- if : env.GHCR_PUSH_TOKEN != ''
161- uses : docker/login-action@v3
162- with :
163- registry : ghcr.io
164- username : ${{ github.repository_owner }}
165- password : ${{ secrets.GHCR_PUSH_TOKEN }}
166- - name : Set Docker metadata
167- id : ocean_node_meta
168- uses : docker/metadata-action@v5
169- with :
170- images : |
171- ${{ env.DOCKERHUB_IMAGE }}
172- ${{ env.GHCR_IMAGE }}
173- # generate Docker tags based on the following events/attributes
174- tags : |
175- type=ref,event=branch
176- type=semver,pattern={{version}}
177- type=ref,event=pr
178- # type=semver,pattern={{major}}.{{minor}}
179- # type=semver,pattern={{major}}
180- # type=sha
181- - name : Build and push to Docker Hub
182- if : steps.dockerhub_login.outcome == 'success'
183- id : build_dockerhub
184- uses : docker/build-push-action@v5
185- with :
186- builder : ${{ steps.buildx.outputs.name }}
187- context : .
188- platforms : ${{ matrix.platform }}
189- push : true
190- # tags: ${{ steps.ocean_node_meta.outputs.tags }}
191- labels : ${{ steps.ocean_node_meta.outputs.labels }}
192- outputs : type=image,name=${{ env.DOCKERHUB_IMAGE }},push-by-digest=true,name-canonical=true,push=true
193- - name : Build and push to GHCR
194- if : steps.ghcr_login.outcome == 'success'
195- id : build_ghcr
196- uses : docker/build-push-action@v5
197- with :
198- builder : ${{ steps.buildx.outputs.name }}
199- context : .
200- platforms : ${{ matrix.platform }}
201- push : true
202- labels : ${{ steps.ocean_node_meta.outputs.labels }}
203- outputs : type=image,name=${{ env.GHCR_IMAGE }},push-by-digest=true,name-canonical=true,push=true
204- - name : Export digests
205- run : |
206- mkdir -p /tmp/digests
207- if [ -n "${{ steps.build_dockerhub.outputs.digest }}" ]; then
208- dockerhub_digest="${{ steps.build_dockerhub.outputs.digest }}"
209- touch "/tmp/digests/dockerhub-arm64-${dockerhub_digest#sha256:}"
210- fi
211- if [ -n "${{ steps.build_ghcr.outputs.digest }}" ]; then
212- ghcr_digest="${{ steps.build_ghcr.outputs.digest }}"
213- touch "/tmp/digests/ghcr-arm64-${ghcr_digest#sha256:}"
214- fi
215- - name : Upload digest
216- uses : actions/upload-artifact@v4
217- with :
218- name : digests-${{ env.PLATFORM_PAIR }}
219- path : /tmp/digests/*
220- if-no-files-found : error
221- retention-days : 1
222-
121+
223122 merge :
224123 runs-on : ubuntu-latest
225124 if : ${{ github.actor != 'dependabot[bot]' }}
226125 needs :
227126 - build
228- - build-arm
229127 steps :
230128 - name : Download digests
231129 uses : actions/download-artifact@v4
0 commit comments