File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ name: Build image
33on :
44 push :
55 branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
68
79permissions :
810 contents : read
@@ -30,19 +32,24 @@ jobs:
3032 registry : ${{ env.REGISTRY }}
3133 username : ${{ github.actor }}
3234 password : ${{ secrets.GITHUB_TOKEN }}
35+ - name : Set up QEMU
36+ uses : docker/setup-qemu-action@v3
3337 - name : Set up Docker Buildx
3438 uses : docker/setup-buildx-action@v3
39+
3540 - name : Build and push
3641 id : docker_build
3742 uses : docker/build-push-action@v6
3843 with :
39- push : true
44+ platforms : linux/amd64,linux/arm64
45+ push : ${{ github.event_name == 'push' }}
4046 tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
4147 cache-from : type=gha
4248 cache-to : type=gha,mode=max
49+
4350 - name : Generate artifact attestation
4451 uses : actions/attest-build-provenance@v2
4552 with :
46- push-to-registry : true
53+ push-to-registry : ${{ github.event_name == 'push' }}
4754 subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4855 subject-digest : ${{ steps.docker_build.outputs.digest }}
You can’t perform that action at this time.
0 commit comments