-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspdx-workflow.yaml
More file actions
76 lines (60 loc) · 1.9 KB
/
spdx-workflow.yaml
File metadata and controls
76 lines (60 loc) · 1.9 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# This workflow annotates the SBOM for the DemaConsulting.DotnetToolWrapper with
# build tools, and generates a summary markdown.
# Workflow Parameters
parameters:
spdx: drop/_manifest/spdx_2.2/manifest.spdx.json
md: drop/_manifest/spdx_2.2/sbom_summary.md
# Steps
steps:
# Rename the Root Package ID
- command: rename-id
displayName: Rename DotnetToolWrapper Package ID
inputs:
spdx: ${{ spdx }}
old: SPDXRef-RootPackage
new: SPDXRef-DemaConsulting-DotnetToolWrapper
# Query the version of dotnet
- command: run-workflow
displayName: Query DotNet SDK Version
inputs:
url: https://raw.githubusercontent.com/demaconsulting/SpdxWorkflows/main/GetDotNetVersion.yaml
outputs:
version: dotnet-version
# Add DotNet SDK Package
- command: run-workflow
displayName: Add DotNet SDK Package
inputs:
url: https://raw.githubusercontent.com/demaconsulting/SpdxWorkflows/main/AddDotNetPackage.yaml
parameters:
spdx: ${{ spdx }}
version: ${{ dotnet-version }}
id: SPDXRef-Package-DotNet-${{ dotnet-version }}
# Add DotNet SDK Relationship
- command: add-relationship
displayName: Add DotNet SDK Relationship
inputs:
spdx: ${{ spdx }}
id: SPDXRef-Package-DotNet-${{ dotnet-version }}
relationships:
- type: BUILD_TOOL_OF
element: SPDXRef-DemaConsulting-DotnetToolWrapper
comment: Dotnet SDK ${{ dotnet-version }} used to build DemaConsulting.DotnetToolWrapper
# Update the SBOM sha256
- command: hash
displayName: Update DotnetToolWrapper SBOM sha256
inputs:
operation: generate
algorithm: sha256
file: ${{ spdx }}
# Validate the SBOM
- command: validate
displayName: Validate DotnetToolWrapper SBOM
inputs:
spdx: ${{ spdx }}
ntia: true
# Generate the library summary
- command: to-markdown
displayName: Generate DotnetToolWrapper SBOM summary
inputs:
spdx: ${{ spdx }}
markdown: ${{ md }}