Skip to content

Commit 7656c1c

Browse files
Update main.yml
handle nonexistent SARIF file gracefully
1 parent 7b24bf8 commit 7656c1c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,16 @@ jobs:
8686
pipeline-results-json: results.json
8787
output-results-sarif: veracode-results.sarif
8888
finding-rule-level: "4:3:0"
89-
- uses: github/codeql-action/upload-sarif@v3
89+
90+
- name: Check for SARIF
91+
id: check_sarif
92+
uses: andstor/file-existence-action@v1
93+
with:
94+
files: "veracode-results.sarif"
95+
96+
- name: Upload SARIF
97+
if: steps.check_sarif.outputs.files_exists == 'true'
98+
uses: github/codeql-action/upload-sarif@v3
9099
with:
91100
# Path to SARIF file relative to the root of the repository
92101
sarif_file: veracode-results.sarif

0 commit comments

Comments
 (0)