Fix trivy report download (#10943)

Signed-off-by: Derek Nola <derek.nola@suse.com>
pull/10949/head
Derek Nola 2 months ago committed by GitHub
parent cda31ebd67
commit 97e8486032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -68,11 +68,9 @@ jobs:
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: trivy-report name: trivy-report
path: trivy-report.txt
- name: Add Trivy Report to PR - name: Add Trivy Report to PR
run: | run: |
sudo chown runner:runner trivy-report.txt
if [ -s trivy-report.txt ] && [ -n "$(grep -v '^\s*$' trivy-report.txt)" ]; then if [ -s trivy-report.txt ] && [ -n "$(grep -v '^\s*$' trivy-report.txt)" ]; then
echo '```' | cat - trivy-report.txt > temp && mv temp trivy-report.txt echo '```' | cat - trivy-report.txt > temp && mv temp trivy-report.txt
echo '```' >> trivy-report.txt echo '```' >> trivy-report.txt

Loading…
Cancel
Save