-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (30 loc) · 892 Bytes
/
Copy pathsbom.yml
File metadata and controls
33 lines (30 loc) · 892 Bytes
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
name: Scan packages and upload SBOM
'on':
push:
branches:
- main
# deploy manually
workflow_dispatch:
jobs:
upload_sbom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Generate SBOM using Syft
uses: anchore/sbom-action@v0
with:
format: cyclonedx-json
artifact-name: sbom.json
- uses: actions/download-artifact@v5
with:
name: sbom.json
- name: Upload SBOM to DependencyTrack
run: |
curl -sS -X "POST" "https://dependencytrack.cicd.civicactions.net/api/v1/bom" \
-H "Content-Type: multipart/form-data" \
-H "X-Api-Key: ${{ secrets.DEPENDENCYTRACK_APIKEY }}" \
-F "projectName=CivicActions Homesite" \
-F "projectVersion=main" \
-F "bom=@sbom.json" > /dev/null
shell: bash
#