docker: Generate build provenance attestations
Co-authored-by: BrailleBennett <BrailleBennett@users.noreply.github.com> Co-authored-by: TheSuperGamer20578 <TheSuperGamer20578@users.noreply.github.com>
This commit is contained in:
parent
a82881b7d3
commit
cc3d2af15f
1 changed files with 9 additions and 0 deletions
9
.github/workflows/ci-docker.yml
vendored
9
.github/workflows/ci-docker.yml
vendored
|
|
@ -6,6 +6,8 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
attestations: write
|
||||
id-token: write
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -28,6 +30,7 @@ jobs:
|
|||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
- name: Build image
|
||||
id: build
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
|
|
@ -38,3 +41,9 @@ jobs:
|
|||
pull: true
|
||||
cache-from: type=gha, scope=${{ github.workflow }}
|
||||
cache-to: type=gha, scope=${{ github.workflow }}
|
||||
- name: Generate build provenance attestation
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-name: ghcr.io/${{ github.repository }}
|
||||
subject-digest: ${{ steps.build.outputs.digest }}
|
||||
push-to-registry: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue