From 0d6989b059fb076bffea11b9c5336908bce72e01 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Wed, 18 Dec 2024 20:31:33 +0100 Subject: [PATCH] Check presence of sarif files before executing `codeql-action/upload-sarif` because the action behavior is to throw errors when no sarif files are available... Closes #1759 --- .github/workflows/Build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index a814ffc8d..1ea971096 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -151,7 +151,7 @@ jobs: path: '**/build/reports/lint-results-*.html' - name: Upload lint reports (SARIF) - if: always() + if: ${{ !cancelled() && hashFiles('**/*.sarif') != '' }} uses: github/codeql-action/upload-sarif@v3 with: sarif_file: './'