-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.16 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: npm-artifacts
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
attestations: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Build project
run: |
npm run build
npm sbom --omit dev --package-lock-only --sbom-format cyclonedx | jq >npm.cdx.json
- name: Upload semgrep.sarif.json
uses: actions/upload-artifact@v4
with:
name: semgrep_sarif
path: semgrep.sarif.json
- name: Upload npm.cdx.json
uses: actions/upload-artifact@v4
with:
name: sbom
path: npm.cdx.json
- name: Generate SBOM attestation
uses: actions/attest-sbom@v1
env:
INPUT_PRIVATE-SIGNING: 'true'
with:
subject-digest: 'sha256:7d070f6b64d9bcc530fe99cc21eaaa4b3c364e0b2d367d7735671fa202a03b32'
subject-name: 'subject'
sbom-path: npm.cdx.json