forked from eclipse-kuksa/kuksa-databroker
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (30 loc) · 888 Bytes
/
sbom.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
name: Generate SBOM
on:
push:
branches:
- main
pull_request:
jobs:
generate-sbom:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh
- name: Generate CycloneDX SBOM
run: |
./bin/syft . -o cyclonedx-json > sbom.json
- name: Upload SBOM to Dependency-Track
run: |
curl -X "POST" "http://34.46.105.78:8080/api/v1/bom" \
-H "X-Api-Key: odt_LCjFjndcfjTpWEKr2oSc3KKsbgVHO3VC" \
-H "Content-Type: multipart/form-data" \
-F "project=d2f9cf45-e514-4039-a666-4ae157245879" \
-F "bom=@sbom.json"
- name: Upload SBOM artifact
uses: actions/upload-artifact@v3
with:
name: sbom
path: sbom.json