Skip to content

Commit

Permalink
🧹 Fixing the Pipeline Lint Issue (#383)
Browse files Browse the repository at this point in the history
Signed-off-by: Hossein Rouhani <[email protected]>
  • Loading branch information
HRouhani authored Apr 21, 2024
1 parent be648fe commit cf4c984
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
Expand All @@ -18,10 +19,25 @@ jobs:
with:
path: .
output-file: "results.sarif"
- name: Install jq
run: sudo apt-get install jq
- name: Display SARIF file content
run: cat results.sarif
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
- name: Check SARIF file content
id: check_sarif
run: |
echo "Checking SARIF file content..."
RESULTS_EMPTY=$(cat results.sarif | jq '.runs[0].results | length == 0')
if [ "$RESULTS_EMPTY" = "true" ]; then
echo "SARIF file content is as expected. No results found."
else
echo "SARIF file contains results, indicating issues were found. Please review the SARIF file content below for more details, or check the 'Security' tab for alerts once the file has been uploaded."
exit 1
fi
license-check:
runs-on: ubuntu-latest
Expand Down

0 comments on commit cf4c984

Please sign in to comment.