File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,24 @@ jobs:
8585 echo "tags=$_AZ_REGISTRY/bws:${IMAGE_TAG}" >> $GITHUB_OUTPUT
8686 fi
8787
88+ # it takes significantly longer to build for the linux/arm64 platform,
89+ # so we only build for both platforms on pushes to main
90+ - name : Set build targets based on workflow trigger
91+ id : platforms
92+ run : |
93+ if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
94+ echo "platforms=linux/amd64" >> $GITHUB_OUTPUT
95+ else
96+ echo "platforms=linux/amd64,linux/arm64/v8" >> $GITHUB_OUTPUT
97+ fi
98+
8899 - name : Build and push Docker image
89100 id : build-docker
90101 uses : docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
91102 with :
92103 context : .
93104 file : crates/bws/Dockerfile
94- platforms : |
95- linux/amd64,
96- linux/arm64/v8
105+ platforms : ${{ steps.platforms.outputs.platforms }}
97106 push : true
98107 tags : ${{ steps.tag-list.outputs.tags }}
99108 secrets : |
You can’t perform that action at this time.
0 commit comments