Skip to content

Commit e9cc2b1

Browse files
committed
feat: export all artifacts in one zip file: xml, json and html outputs
1 parent 503efdd commit e9cc2b1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/sbom.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,21 @@ jobs:
5454
TIMESTAMP=$(date -u +"%Y%m%d-%H%M%S")
5555
echo "artifact_name=sbom-${SAFE_BRANCH}-${TIMESTAMP}" >> $GITHUB_OUTPUT
5656
57-
- name: Rename SBOM HTML file to match artifact name
58-
run: mv sbom.html "${{ steps.vars.outputs.artifact_name }}.html"
57+
- name: Rename SBOM XML and HTML files to match artifact name
58+
run: |
59+
mv sbom.html "${{ steps.vars.outputs.artifact_name }}.html"
60+
mv build/reports/bom.xml "${{ steps.vars.outputs.artifact_name }}.xml"
61+
mv build/reports/bom.json "${{ steps.vars.outputs.artifact_name }}.json"
62+
63+
- name: ZIP all the files
64+
run: |
65+
zip "${{ steps.vars.outputs.artifact_name }}.zip" \
66+
"${{ steps.vars.outputs.artifact_name }}.html" \
67+
"${{ steps.vars.outputs.artifact_name }}.xml" \
68+
"${{ steps.vars.outputs.artifact_name }}.json"
5969
6070
- name: Upload SBOM artifact
6171
uses: actions/upload-artifact@v4
6272
with:
6373
name: ${{ steps.vars.outputs.artifact_name }}
64-
path: ${{ steps.vars.outputs.artifact_name }}.html
74+
path: ${{ steps.vars.outputs.artifact_name }}.zip

0 commit comments

Comments
 (0)