Skip to content

Commit

Permalink
fix: Multi-arch builds as one step
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyo committed Mar 12, 2024
1 parent f154caa commit ff2386f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ff2386f

Please sign in to comment.