@@ -31,42 +31,37 @@ jobs:
3131
3232 permissions :
3333 contents : read
34+ # We currently need `security-events: read` to access feature flags.
35+ security-events : read
3436
3537 steps :
3638 - uses : actions/checkout@v6
37- - name : Init with default CodeQL bundle from the VM image
38- id : init-default
39- uses : ./init
40- with :
41- languages : javascript
42- - name : Remove empty database
43- # allows us to run init a second time
44- run : |
45- rm -rf "$RUNNER_TEMP/codeql_databases"
46- - name : Init with latest CodeQL bundle
47- id : init-latest
48- uses : ./init
39+ - name : Set up default CodeQL bundle
40+ id : setup-default
41+ uses : ./setup-codeql
42+ - name : Set up linked CodeQL bundle
43+ id : setup-linked
44+ uses : ./setup-codeql
4945 with :
5046 tools : linked
51- languages : javascript
52- - name : Compare default and latest CodeQL bundle versions
47+ - name : Compare default and linked CodeQL bundle versions
5348 id : compare
5449 env :
55- CODEQL_DEFAULT : ${{ steps.init -default.outputs.codeql-path }}
56- CODEQL_LATEST : ${{ steps.init-latest .outputs.codeql-path }}
50+ CODEQL_DEFAULT : ${{ steps.setup -default.outputs.codeql-path }}
51+ CODEQL_LINKED : ${{ steps.setup-linked .outputs.codeql-path }}
5752 run : |
5853 CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)"
59- CODEQL_VERSION_LATEST ="$("$CODEQL_LATEST " version --format terse)"
54+ CODEQL_VERSION_LINKED ="$("$CODEQL_LINKED " version --format terse)"
6055 echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
61- echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST "
56+ echo "Linked CodeQL bundle version is $CODEQL_VERSION_LINKED "
6257
6358 # If we're running on a pull request, run with both bundles, even if `tools: linked` would
6459 # be the same as `tools: null`. This allows us to make the job for each of the bundles a
6560 # required status check.
6661 #
6762 # If we're running on push or schedule, then we can skip running with `tools: linked` when it would be
6863 # the same as running with `tools: null`.
69- if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$GITHUB_EVENT_NAME" != "merge_group" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST " ]]; then
64+ if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$GITHUB_EVENT_NAME" != "merge_group" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LINKED " ]]; then
7065 VERSIONS_JSON='[null]'
7166 else
7267 VERSIONS_JSON='[null, "linked"]'
0 commit comments