feat: show Arch column only when multiple architectures are scanned
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Successful in 1m46s

This commit is contained in:
Philipp committed 2026-09-13 22:01:33 +02:00
1 parent 44dade1825
commit 257e67ff81
2 files changed
+100 -46

No files matched your search

+3 -25
View File
@@ -228,34 +228,12 @@ runs:
trivy sbom --format json --output "cve-reports/target/cve-${arch}.json" "$f" || true
done
# Run multi-arch set-based diff
# Run multi-arch set-based diff and generate consolidated full summary report
node "${{ github.action_path }}/cve-diff.js" \
"cve-reports/target" \
"cve-reports/head" \
"${{ inputs.target-branch }}" > "${{ inputs.output-delta }}" || true
# Generate full markdown summary report for primary platform
primary_sbom=""
if [ -f sboms/head/sbom-amd64.spdx.json ]; then
primary_sbom="sboms/head/sbom-amd64.spdx.json"
elif [ -f sboms/head/sbom-arm64.spdx.json ]; then
primary_sbom="sboms/head/sbom-arm64.spdx.json"
else
for f in sboms/head/sbom-*.spdx.json; do
if [ -f "$f" ]; then
primary_sbom="$f"
break
fi
done
fi
if [ -n "$primary_sbom" ]; then
trivy sbom \
--format template \
--template "@${{ github.action_path }}/markdown.tpl" \
--output "${{ inputs.output-summary }}" \
"$primary_sbom" || true
fi
"${{ inputs.target-branch }}" \
"${{ inputs.output-summary }}" > "${{ inputs.output-delta }}" || true
- name: Publish Reports to Step Summary
shell: bash