Skip to content

Commit 65d30d6

Browse files
committed
ci: add attestation
1 parent f9b11a0 commit 65d30d6

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/docker-pub.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ jobs:
77
name: Buid and push Docker image to GitHub Container registry
88
runs-on: ubuntu-latest
99
permissions:
10-
packages: write
1110
contents: read
11+
packages: write
12+
attestations: write
1213
steps:
1314
- name: Checkout the repository
14-
uses: actions/checkout@v2
15-
16-
- name: Build Meta
17-
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly"
18-
id: meta
15+
uses: actions/checkout@v4
1916

2017
- name: Set up QEMU
2118
uses: docker/setup-qemu-action@v3
@@ -29,8 +26,13 @@ jobs:
2926
username: ${{ github.repository_owner }}
3027
password: ${{ secrets.GITHUB_TOKEN }}
3128

29+
- name: Build Meta
30+
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly"
31+
id: meta
32+
3233
- name: Build and push
3334
uses: docker/build-push-action@v5
35+
id: push
3436
env:
3537
REGISTRY: ghcr.io
3638
OWNER: ${{ github.repository_owner }}
@@ -41,3 +43,10 @@ jobs:
4143
platforms: linux/amd64,linux/arm64
4244
push: true
4345
tags: ${{ steps.meta.outputs.dtag }}
46+
47+
- name: Generate artifact attestation
48+
uses: actions/attest-build-provenance@v1
49+
with:
50+
subject-name: ghcr.io/barelyhuman/goblin:nightly
51+
subject-digest: ${{ steps.push.outputs.digest }}
52+
push-to-registry: true

0 commit comments

Comments
 (0)