Public Access
generated from Philipp/template-git
feat: add write-summary option to publish reports to step summary
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Successful in 33s
Philipp/Global-Workflows: Pre-commit Lint (Scoped) / pre-commit (pull_request) Successful in 33s
This commit is contained in:
1 parent
d422a145a5
commit
f246ae5fcd
2 files changed
+17
No files matched your search
+16
@@ -24,6 +24,10 @@ inputs:
|
||||
description: Output markdown file for full vulnerability summary
|
||||
required: false
|
||||
default: cve-summary.md
|
||||
write-summary:
|
||||
description: Whether to append the generated reports to the job summary ($GITHUB_STEP_SUMMARY)
|
||||
required: false
|
||||
default: 'true'
|
||||
|
||||
outputs:
|
||||
delta-report:
|
||||
@@ -184,3 +188,15 @@ runs:
|
||||
--output "${{ inputs.output-summary }}" \
|
||||
"$primary_sbom" || true
|
||||
fi
|
||||
|
||||
- name: Publish Reports to Step Summary
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ inputs.write-summary }}" = "true" ] && [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then
|
||||
if [ -f "${{ inputs.output-delta }}" ]; then
|
||||
cat "${{ inputs.output-delta }}" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
if [ -f "${{ inputs.output-summary }}" ]; then
|
||||
cat "${{ inputs.output-summary }}" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
fi
|
||||
Reference in new issue
Block a user