Skip to content

Commit

Permalink
Merge pull request #231 from GeoWerkstatt/sbom-format
Browse files Browse the repository at this point in the history
Use separate action for creating the SBOM file
  • Loading branch information
danjov authored Nov 8, 2024
2 parents 460816b + 166b7ae commit 7742066
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,19 @@ jobs:
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

- name: Extract SBOM in SPDX format
run: docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} --format "{{ json .SBOM.SPDX }}" > sbom.spdx.json
- name: Generate SBOM file
uses: anchore/sbom-action@v0
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:edge
format: 'cyclonedx-json'
output-file: 'sbom.cyclonedx.json'

- name: Generate SBOM attestation
uses: actions/attest-sbom@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
sbom-path: 'sbom.spdx.json'
sbom-path: 'sbom.cyclonedx.json'
push-to-registry: true

- name: Create GitHub pre-release
Expand Down

0 comments on commit 7742066

Please sign in to comment.