-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (40 loc) · 1.22 KB
/
sbom.yml
File metadata and controls
48 lines (40 loc) · 1.22 KB
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
name: SBOM upload and commit
on:
workflow_dispatch:
push:
branches: ["master"]
env:
DeleteManifestDirIfPresent: 'true'
jobs:
SBOM-upload:
runs-on: ubuntu-latest
permissions:
packages: write
id-token: write
contents: write
actions: write
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Generate SBOM
run: |
curl -Lo $RUNNER_TEMP/sbom-tool https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-linux-x64
chmod +x $RUNNER_TEMP/sbom-tool
$RUNNER_TEMP/sbom-tool generate -b . -bc . -pn git_command -pv 1.0.0 -ps gon1942
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: sbom
path: _manifest/spdx_2.2
- name: Commit and push SBOM to repository
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add _manifest/spdx_2.2/*
git commit -m "Add generated SBOM"
git push
- name: SBOM upload
uses: advanced-security/spdx-dependency-submission-action@v0.0.1
with:
filePath: "./_manifest/spdx_2.2/"