Skip to content

Commit 5122996

Browse files
committed
set up arm build
1 parent fc8609f commit 5122996

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/build-image.yml

Lines changed: 17 additions & 4 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
@@ -24,25 +26,36 @@ jobs:
2426
id-token: write
2527
steps:
2628
- uses: actions/checkout@v4
29+
- name: Set up Docker
30+
uses: docker/setup-docker-action@v4
31+
with:
32+
daemon-config: |
33+
{
34+
"debug": true,
35+
"features": {
36+
"containerd-snapshotter": true
37+
}
38+
}
2739
- name: Log in to ghcr.io
2840
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
2941
with:
3042
registry: ${{ env.REGISTRY }}
3143
username: ${{ github.actor }}
3244
password: ${{ secrets.GITHUB_TOKEN }}
33-
- name: Set up Docker Buildx
34-
uses: docker/setup-buildx-action@v3
45+
- name: Set up QEMU
46+
uses: docker/setup-qemu-action@v3
3547
- name: Build and push
3648
id: docker_build
3749
uses: docker/build-push-action@v6
3850
with:
39-
push: true
51+
platforms: linux/amd64,linux/arm64
52+
push: ${{ github.event_name == 'push' }}
4053
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
4154
cache-from: type=gha
4255
cache-to: type=gha,mode=max
4356
- name: Generate artifact attestation
4457
uses: actions/attest-build-provenance@v2
4558
with:
46-
push-to-registry: true
59+
push-to-registry: ${{ github.event_name == 'push' }}
4760
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4861
subject-digest: ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)