Skip to content

Commit

Permalink
Merge pull request #293 from Marukome0743/pr293
Browse files Browse the repository at this point in the history
♻️ci: add Attest provenance to docker
  • Loading branch information
Marukome0743 authored May 8, 2024
2 parents 9960807 + ff82852 commit 873053d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ env:
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
contents: read
attestations: write

steps:
- name: Checkout
Expand Down Expand Up @@ -91,7 +96,14 @@ jobs:
annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
provenance: ${{ fromJSON(env.IS_PUSH) && 'mode=max' || false }}

- name: Attest
if: fromJSON(env.IS_PUSH)
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REPOSITORY }}
subject-digest: ${{ steps.push.outputs.digest }}

- name: Docker Scout
if: github.repository_owner == env.REPOSITORY_OWNER && github.event_name == 'pull_request_target'
Expand Down

0 comments on commit 873053d

Please sign in to comment.