-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💚 (repo): Generate SBOM when lockfile changes
- Loading branch information
1 parent
abbb326
commit 3e490b7
Showing
4 changed files
with
60 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: "Download SBOM from Github" | ||
description: "Download the SBOM from Github API" | ||
author: "valpinkman" | ||
inputs: | ||
owner: | ||
description: "The owner of the repository" | ||
required: true | ||
repo: | ||
description: "The repository name" | ||
required: true | ||
token: | ||
default: ${{ github.token }} | ||
description: "The Github token to use to download the SBOM" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Download SBOM | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ inputs.token }} | ||
run: | | ||
gh api \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
/repos/${{ inputs.owner }}/${{ inputs.repo }}/dependency-graph/sbom > sbom.json | ||
- name: Upload SBOM | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sbom | ||
path: sbom.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Generate SBOM | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths: | ||
- "pnpm-lock.yaml" | ||
|
||
jobs: | ||
generate-sbom: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: LedgerHQ/device-sdk-ts/.github/actions/setup-toolchain-composite@develop | ||
|
||
- uses: ./.github/actions/generate-sbom-composite | ||
with: | ||
owner: "LedgerHQ" | ||
repo: "device-sdk-ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,7 @@ lib | |
.eslintcache | ||
|
||
# npm config | ||
.npmrc | ||
.npmrc | ||
|
||
# sbom | ||
sbom.json |