Skip to content

Commit 921f71e

Browse files
authored
Merge pull request #215 from smlx/sbom-api
fix: use the GitHub REST API for SBOM
2 parents 3996ae8 + df1cdeb commit 921f71e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,13 @@ jobs:
4444
registry: ghcr.io
4545
username: ${{ github.repository_owner }}
4646
password: ${{ secrets.GITHUB_TOKEN }}
47-
- uses: advanced-security/sbom-generator-action@6fe43abf522b2e7a19bc769aec1e6c848614b517 # v0.0.2
48-
id: sbom
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
- name: Move sbom to avoid dirty git
52-
run: mv "$GITHUB_SBOM_PATH" ./sbom.spdx.json
53-
env:
54-
GITHUB_SBOM_PATH: ${{ steps.sbom.outputs.fileName }}
47+
- name: Export SBOM in SPDX JSON format
48+
# https://docs.github.com/en/rest/dependency-graph/sboms?apiVersion=2022-11-28
49+
run: |
50+
gh api \
51+
-H "Accept: application/vnd.github+json" \
52+
-H "X-GitHub-Api-Version: 2022-11-28" \
53+
/repos/${{ github.repository }}/dependency-graph/sbom > sbom.spdx.json
5554
- uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
5655
id: goreleaser
5756
with:

0 commit comments

Comments
 (0)