Skip to content

Commit a90d2ba

Browse files
committed
ci: fix attestation perms
1 parent 18004f5 commit a90d2ba

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/docker-pub.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Docker Pub
22

3-
on: workflow_dispatch
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
47

58
jobs:
69
build:
@@ -10,9 +13,15 @@ jobs:
1013
contents: read
1114
packages: write
1215
attestations: write
16+
id-token: write
17+
1318
steps:
1419
- name: Checkout the repository
1520
uses: actions/checkout@v4
21+
22+
- name: Get current date
23+
id: date
24+
run: echo "::set-output name=date::$(date +'%Y%m%d')"
1625

1726
- name: Set up QEMU
1827
uses: docker/setup-qemu-action@v3
@@ -27,7 +36,7 @@ jobs:
2736
password: ${{ secrets.GH_TOKEN }}
2837

2938
- name: Build Meta
30-
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly"
39+
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly-${{ steps.date.outputs.date }}"
3140
id: meta
3241

3342
- name: Build and push
@@ -47,6 +56,6 @@ jobs:
4756
- name: Generate artifact attestation
4857
uses: actions/attest-build-provenance@v1
4958
with:
50-
subject-name: ghcr.io/barelyhuman/goblin:nightly
59+
subject-name: ghcr.io/barelyhuman/goblin
5160
subject-digest: ${{ steps.push.outputs.digest }}
5261
push-to-registry: true

0 commit comments

Comments
 (0)