Skip to content

Commit

Permalink
ci: add attestation
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed May 3, 2024
1 parent f9b11a0 commit a24289e
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/docker-pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ jobs:
name: Buid and push Docker image to GitHub Container registry
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
packages: write
attestations: write
steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Build Meta
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly"
id: meta
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -28,9 +25,14 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Meta
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly"
id: meta

- name: Build and push
uses: docker/build-push-action@v5
id: push
env:
REGISTRY: ghcr.io
OWNER: ${{ github.repository_owner }}
Expand All @@ -41,3 +43,10 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.dtag }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ghcr.io/barelyhuman/goblin:nightly
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit a24289e

Please sign in to comment.