File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
actions/find-latest-bundle Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Find Latest CodeQL Bundle
2+ description : Finds the URL of the latest released version of the CodeQL bundle.
3+ outputs :
4+ url :
5+ description : The download URL of the latest CodeQL bundle release
6+ value : ${{ steps.find-latest.outputs.url }}
7+ runs :
8+ using : composite
9+ steps :
10+ - name : Find Latest Release
11+ id : find-latest
12+ shell : pwsh
13+ run : |
14+ $Latest = gh release list --exclude-drafts --limit 1000 |
15+ ForEach-Object { $C = $_ -split "`t"; return @{ type = $C[1]; tag = $C[2]; } } |
16+ Where-Object { $_.type -eq 'Latest' }
17+
18+ $Tag = $Latest.tag
19+ Write-Output "Latest bundle tag is '${Tag}'."
20+ "url=https://github.com/github/codeql-action/releases/download/${Tag}/codeql-bundle-linux64.tar.gz" >> $env:GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -22,12 +22,15 @@ jobs:
2222 steps :
2323 # ## Build the queries ###
2424 - uses : actions/checkout@v3
25+ - name : Find latest bundle
26+ id : find-latest-bundle
27+ uses : ./.github/actions/find-latest-bundle
2528 - name : Find codeql
2629 id : find-codeql
2730 uses : github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
2831 with :
2932 languages : javascript # does not matter
30- tools : latest
33+ tools : ${{ steps.find- latest-bundle.outputs.url }}
3134 - name : Get CodeQL version
3235 id : get-codeql-version
3336 run : |
You can’t perform that action at this time.
0 commit comments