Skip to content

Commit 74c973b

Browse files
committed
Use native runner
1 parent beb370d commit 74c973b

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@ on:
66
- main
77

88
jobs:
9-
publish-docker-image:
10-
name: Publish Docker image
11-
runs-on: ubuntu-latest
9+
build-docker-image:
10+
name: Build Docker image
11+
12+
strategy:
13+
matrix:
14+
arch:
15+
- os: ubuntu-24.04
16+
platform: amd64
17+
- os: ubuntu-24.04-arm
18+
platform: arm64
19+
20+
runs-on: ${{ matrix.arch.os }}
1221

1322
permissions:
1423
contents: read
@@ -25,15 +34,27 @@ jobs:
2534
username: ${{ github.actor }}
2635
password: ${{ secrets.GITHUB_TOKEN }}
2736

28-
- name: Set up QEMU
29-
uses: docker/setup-qemu-action@v3
30-
3137
- name: Set up Docker Buildx
3238
uses: docker/setup-buildx-action@v3
3339

3440
- name: Build and push
41+
id: build
3542
uses: docker/build-push-action@v6
3643
with:
37-
platforms: linux/amd64,linux/arm64
38-
push: true
39-
tags: ghcr.io/louismt/ddns-proxy:latest
44+
platforms: linux/${{ matrix.arch.platform }}
45+
tags: ghcr.io/louismt/ddns-proxy
46+
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
47+
48+
- name: Export digest
49+
run: |
50+
mkdir -p ${{ runner.temp }}/digests
51+
digest="${{ steps.build.outputs.digest }}"
52+
touch "${{ runner.temp }}/digests/${digest#sha256:}"
53+
54+
- name: Upload digest
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: digests-${{ matrix.arch.platform }}
58+
path: ${{ runner.temp }}/digests/*
59+
if-no-files-found: error
60+
retention-days: 1

0 commit comments

Comments
 (0)