From ff2386f6b1176a36ebfcdb96222ae5840dac8cf1 Mon Sep 17 00:00:00 2001 From: Anton Ovchinnikov Date: Tue, 12 Mar 2024 19:02:11 +0100 Subject: [PATCH] fix: Multi-arch builds as one step --- .github/workflows/build-push.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-push.yaml b/.github/workflows/build-push.yaml index a894c99..0aca305 100644 --- a/.github/workflows/build-push.yaml +++ b/.github/workflows/build-push.yaml @@ -19,11 +19,14 @@ on: jobs: build-and-push: - strategy: - matrix: - arch: - - linux/amd64 - - linux/arm64 + ## The matrix build doesn't work right now, because the push step for the slowest arch + ## will overwrite the metadata for the faster arch. + ## We should implement this to fix it: https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners + # strategy: + # matrix: + # arch: + # - linux/amd64 + # - linux/arm64 permissions: packages: write contents: read @@ -58,7 +61,7 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . - platforms: "${{ matrix.arch }}" + platforms: linux/amd64,linux/arm64 push: ${{ github.ref == 'refs/heads/master' }} tags: | ghcr.io/${{ github.repository }}:latest