From 0c26bdfa61cbee76a8c3d9ab91c3248a6fc7f18b Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 27 Aug 2024 16:16:45 -0700 Subject: [PATCH] vv Signed-off-by: Derek Nola --- .github/workflows/trivy.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml index f20f345282b9..df01d4479cc9 100644 --- a/.github/workflows/trivy.yaml +++ b/.github/workflows/trivy.yaml @@ -21,7 +21,7 @@ jobs: - name: Comment Status on PR run: | gh repo set-default ${{ github.repository }} - gh pr comment ${{ github.event.issue.number }} -b ":construction: Running Trivy scan started on PR :construction: " + gh pr comment ${{ github.event.issue.number }} -b ":construction: Running Trivy scan on PR :construction: " - name: Build K3s Image run: | @@ -40,4 +40,9 @@ jobs: run: | echo '```' | cat - trivy-report.txt > temp && mv temp trivy-report.txt echo '```' >> trivy-report.txt - gh issue comment ${{ github.event.issue.number }} --edit-last -F trivy-report.txt \ No newline at end of file + gh issue comment ${{ github.event.issue.number }} --edit-last -F trivy-report.txt + + - name: Report Failure + if: ${{ failure() }} + run: | + gh issue comment ${{ github.event.issue.number }} --edit-last -b ":x: Trivy scan action failed, check logs :x:" \ No newline at end of file