-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.45 KB
/
Copy pathsbom.yml
File metadata and controls
53 lines (44 loc) · 1.45 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
49
50
51
52
53
# SBOM Generation - Software Bill of Materials
# https://github.com/anchore/sbom-action
# Generates an SBOM for every release, providing transparency into
# your project's dependencies as recommended by OpenSSF.
name: Generate SBOM
on:
release:
types: [published]
push:
branches: [ "main", "master" ]
permissions: read-all
jobs:
sbom:
name: Generate SBOM
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Generate SBOM (SPDX)
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0.24.0
with:
format: spdx-json
output-file: sbom-spdx.json
- name: Generate SBOM (CycloneDX)
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0.24.0
with:
format: cyclonedx-json
output-file: sbom-cyclonedx.json
- name: Upload SBOMs as artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sbom
path: |
sbom-spdx.json
sbom-cyclonedx.json
- name: Attach SBOMs to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
with:
files: |
sbom-spdx.json
sbom-cyclonedx.json