Skip to content

Commit

Permalink
Allow the disabling of code-scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
another-rex committed Dec 10, 2023
1 parent dd26cdc commit 6f49698
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/osv-scanner-reusable-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ on:
description: "File name of the result SARIF file"
type: string
default: results.sarif
upload-sarif:
description: "Whether to upload to Security > Code Scanning"sarif
type: bool
default: true

jobs:
scan-pr:
Expand Down Expand Up @@ -94,7 +98,7 @@ jobs:
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
if: '!cancelled()'
if: '!cancelled() && ${{ inputs.upload-sarif }}'
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
sarif_file: ${{ inputs.results-file-name }}
2 changes: 1 addition & 1 deletion .github/workflows/osv-scanner-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
if: '!cancelled()'
if: '!cancelled() && ${{ inputs.upload-sarif }}'
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
sarif_file: ${{ inputs.results-file-name }}
Expand Down

0 comments on commit 6f49698

Please sign in to comment.