Skip to content

Commit

Permalink
ci: fix attestation perms
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Jun 25, 2024
1 parent 18004f5 commit a90d2ba
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/docker-pub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Docker Pub

on: workflow_dispatch
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
build:
Expand All @@ -10,9 +13,15 @@ jobs:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"

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

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

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

0 comments on commit a90d2ba

Please sign in to comment.