Skip to content

Commit

Permalink
Update analyze & fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx committed Dec 17, 2024
1 parent 6a7cc93 commit 7fd34d3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 22 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/example-build-deploy-dotnet-google.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
# START REMOVE FROM EXAMPLE
checkout: 'false'
upload-results: 'false'
ref: ${{ steps.checkout.outputs.ref }}
sha: ${{ steps.checkout.outputs.commit }}
# END REMOVE FROM EXAMPLE

unit-tests:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/example-build-deploy-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
# START REMOVE FROM EXAMPLE
checkout: 'false'
upload-resport: 'false'
codeql-results-ref: ${{ steps.checkout.outputs.ref }}
codeql-results-sha: ${{ steps.checkout.outputs.commit }}
# END REMOVE FROM EXAMPLE

unit-tests:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/example-build-deploy-go-google.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
# START REMOVE FROM EXAMPLE
checkout: 'false'
upload-results: 'false'
codeql-results-ref: ${{ steps.checkout.outputs.ref }}
codeql-results-sha: ${{ steps.checkout.outputs.commit }}
# END REMOVE FROM EXAMPLE

build-scan:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/example-build-deploy-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ jobs:
language: 'go'
# START REMOVE FROM EXAMPLE
checkout: 'false'
upload-results: 'true'
codeql-results-ref: ${{ steps.checkout.outputs.ref }}
codeql-results-sha: ${{ steps.checkout.outputs.commit }}
upload-results: 'false'
# END REMOVE FROM EXAMPLE

build-scan:
Expand Down
14 changes: 1 addition & 13 deletions analyze/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ inputs:
description: 'If `true` the action will upload CodeQL results to GitHub Security Code Scanning. If `false`, the action will not upload results.'
required: false
default: 'true'
codeql-results-ref:
description: |
The ref where CodeQL results will be uploaded. Defaults to `github.ref`.
ONLY USED FOR INTERNAL TESTING.
required: false
codeql-results-sha:
description: |
The sha of the HEAD of the ref where CodeQL results will be uploaded. Defaults to `github.sha`.
ONLY USED FOR INTERNAL TESTING.
required: false

runs:
using: 'composite'
Expand Down Expand Up @@ -77,6 +67,4 @@ runs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
ref: ${{ inputs.codeql-results-ref == '' && github.ref || inputs.codeql-results-ref }}
sha: ${{ inputs.codeql-results-sha == '' && github.sha || inputs.codeql-results-sha }}
upload-database: ${{ inputs.upload-results }}
upload: ${{ inputs.upload-results == 'true' && 'always' || 'never' }}

0 comments on commit 7fd34d3

Please sign in to comment.