Skip to content

Commit

Permalink
ci: generate sbom and provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Mar 24, 2024
1 parent 91e8819 commit a63f08b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,26 @@ jobs:
uses: docker/bake-action@v4
with:
targets: artifact
provenance: mode=max
sbom: true
pull: true
set: |
*.platform=${{ matrix.platform }}
*.cache-from=type=gha,scope=artifact-${{ env.PLATFORM_PAIR }}
*.cache-to=type=gha,scope=artifact-${{ env.PLATFORM_PAIR }},mode=max
-
name: Rename provenance and sbom
working-directory: ${{ env.DESTDIR }}/artifact
run: |
binname=$(find . -name 'ddns-route53_*')
filename=$(basename "$binname" | sed -E 's/\.(tar\.gz|zip)$//')
mv "provenance.json" "${filename}.provenance.json"
mv "sbom-binary.spdx.json" "${filename}.sbom.json"
find . -name 'sbom*.json' -exec rm {} \;
-
name: List artifacts
run: |
tree -nh ${{ env.DESTDIR }}
-
name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -233,6 +248,8 @@ jobs:
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: image-all
provenance: mode=max
sbom: true
pull: true
push: ${{ github.event_name != 'pull_request' }}
set: |
Expand Down

0 comments on commit a63f08b

Please sign in to comment.