Skip to content

Commit

Permalink
ci: attest build provenance for images
Browse files Browse the repository at this point in the history
Signed-off-by: David Bauer <[email protected]>
  • Loading branch information
blocktrron committed Jun 24, 2024
1 parent 52514f1 commit 6517efb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ jobs:
runs-on: ubuntu-22.04
if: >
needs.targets.outputs.targets != '[]'
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -260,6 +263,14 @@ jobs:
gluon-path: "gluon-gha-data/gluon"
hardware-target: ${{ matrix.target }}

- name: Attest Image Build Provenance
if: ${{ needs.build-meta.outputs.create-release != '0' }}
uses: actions/attest-build-provenance@v1
with:
subject-path: |
"gluon-gha-data/gluon/output/images/sysupgrade/*"
"gluon-gha-data/gluon/output/images/other/*"
"gluon-gha-data/gluon/output/images/factory/*"
manifest:
needs: [build, build-meta, targets]
Expand Down Expand Up @@ -487,6 +498,8 @@ jobs:
github.event_name == 'push'
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -524,6 +537,12 @@ jobs:
gluon-gha-data/release-artifacts/build-meta.txt
gluon-gha-data/release-notes.md
- name: Attest Release Artifact Build Provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: |
gluon-gha-data/release-artifacts/*
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
Expand Down

0 comments on commit 6517efb

Please sign in to comment.