Skip to content

Commit

Permalink
Enable attestations
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew DeVenny <[email protected]>
  • Loading branch information
matthewdevenny committed Dec 12, 2024
1 parent 28183a0 commit e787669
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ jobs:
build:
name: Build
runs-on: "ubuntu-latest"
permissions:
id-token: write
packages: write
contents: read
attestations: write
steps:

- name: Checkout
Expand Down Expand Up @@ -68,6 +73,10 @@ jobs:
make
fi
- uses: actions/attest-build-provenance@v2
with:
subject-path: 'release/**/dockcmd*'

- name: Release Artifacts
if: ${{ env.RELEASE == 'yes' }}
run: |
Expand Down Expand Up @@ -103,6 +112,7 @@ jobs:

- name: Build and push
if: ${{ env.PUBLISH == 'yes' }}
id: push
uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -113,3 +123,19 @@ jobs:
tags: |
boxboat/dockcmd:${{ env.CI_VERSION }}
ghcr.io/boxboat/dockcmd:${{ env.CI_VERSION }}
- name: Attest ghcr image
uses: actions/attest-build-provenance@v2
id: attest
with:
subject-name: ghcr.io/boxboat/dockcmd:${{ env.CI_VERSION }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

- name: Attest hub image
uses: actions/attest-build-provenance@v2
id: attest
with:
subject-name: boxboat/dockcmd:${{ env.CI_VERSION }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit e787669

Please sign in to comment.