From 8125331b3b6d9e3e533e22d7dca7c909f8ba0e62 Mon Sep 17 00:00:00 2001 From: Arunavo Ray Date: Mon, 19 May 2025 10:30:27 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Fix=20Docker=20build=20workflow=20t?= =?UTF-8?q?o=20correctly=20reference=20architecture=20in=20image=20tags=20?= =?UTF-8?q?and=20clean=20up=20comments=20for=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-build-multi.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-build-multi.yml b/.github/workflows/docker-build-multi.yml index 1f9bc35..c59c82a 100644 --- a/.github/workflows/docker-build-multi.yml +++ b/.github/workflows/docker-build-multi.yml @@ -11,9 +11,8 @@ env: IMAGE: ${{ github.repository }} jobs: - # Build platform-specific images in parallel build: - name: Build ${{ matrix.platform }} + name: Build ${{ matrix.arch }} runs-on: ${{ matrix.runner }} strategy: matrix: @@ -25,7 +24,6 @@ jobs: platform: linux/arm64 runner: ubuntu-24.04-arm - permissions: contents: read packages: write @@ -52,11 +50,11 @@ jobs: context: . platforms: ${{ matrix.platform }} push: ${{ github.event_name != 'pull_request' }} - tags: ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ matrix.platform-suffix }}-${{ github.sha }} + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ matrix.arch }}-${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max - # Create and push the multi-platform manifest manifest: name: Create and Push Manifest runs-on: ubuntu-latest @@ -80,7 +78,6 @@ jobs: - name: Create and push manifest run: | - # Create and push the manifest with both architectures docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest \ ${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64-${{ github.sha }} \ ${{ env.REGISTRY }}/${{ env.IMAGE }}:arm64-${{ github.sha }} @@ -89,6 +86,5 @@ jobs: ${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64-${{ github.sha }} \ ${{ env.REGISTRY }}/${{ env.IMAGE }}:arm64-${{ github.sha }} - # Push the manifests docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest - docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }} \ No newline at end of file + docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }}