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:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -28,6 +30,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository }}
|
images: ghcr.io/${{ github.repository }}
|
||||||
- name: Build image
|
- name: Build image
|
||||||
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
|
@ -38,3 +41,9 @@ jobs:
|
||||||
pull: true
|
pull: true
|
||||||
cache-from: type=gha, scope=${{ github.workflow }}
|
cache-from: type=gha, scope=${{ github.workflow }}
|
||||||
cache-to: 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