Skip to content

Commit 7c7eae4

Browse files
committed
fix
1 parent fc8609f commit 7c7eae4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/build-image.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Build image
33
on:
44
push:
55
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
68

79
permissions:
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 }}

0 commit comments

Comments
 (0)