File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 strategy :
4141 fail-fast : false
4242 matrix : ${{ fromJSON(needs.discover.outputs.matrix) }}
43- env :
44- PLATS : linux/amd64,linux/arm64
43+
4544 steps :
4645 - name : Checkout repository
4746 uses : actions/checkout@v4
@@ -78,14 +77,24 @@ jobs:
7877 echo "Generated Dockerfile:"
7978 sed -n '1,60p' Dockerfile.generated
8079
80+ - name : Choose platforms for this item
81+ id : plats
82+ run : |
83+ PLATS="linux/amd64,linux/arm64"
84+ case "${{ matrix.docker_from }}" in
85+ archlinux:*) PLATS="linux/amd64" ;; # Arch has no arm64 base
86+ esac
87+ echo "plats=$PLATS" >> "$GITHUB_OUTPUT"
88+
89+
8190 # Multi-arch when pushing; single-arch and load locally on PRs
8291 - name : Build and Push (release/merge)
8392 if : ${{ github.event_name != 'pull_request' }}
8493 uses : docker/build-push-action@v5
8594 with :
8695 context : .
8796 file : ./Dockerfile.generated
88- platforms : ${{ env.PLATS }}
97+ platforms : ${{ steps.plats.outputs.plats }}
8998 push : true
9099 tags : ${{ steps.meta.outputs.tags }}
91100 labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments