diff --git a/.github/workflows/upgrade_codeql_dependencies.yml b/.github/workflows/upgrade_codeql_dependencies.yml index 6474aaffb7..73721d5581 100644 --- a/.github/workflows/upgrade_codeql_dependencies.yml +++ b/.github/workflows/upgrade_codeql_dependencies.yml @@ -12,7 +12,7 @@ env: XARGS_MAX_PROCS: 4 jobs: - say_hello: + upgrade_codeql_dependencies: env: CODEQL_CLI_VERSION: ${{ github.event.inputs.codeql_cli_version }} runs-on: ubuntu-22.04 @@ -33,26 +33,29 @@ jobs: GITHUB_TOKEN: ${{ github.token }} CODEQL_CLI_VERSION: ${{ github.event.inputs.codeql_cli_version }} run: | - scripts/upgrade-codeql-dependencies/upgrade_codeql_dependencies.py --cli-version "$CODEQL_CLI_VERSION" + python3 scripts/upgrade-codeql-dependencies/upgrade-codeql-dependencies.py --cli-version "$CODEQL_CLI_VERSION" - name: Fetch CodeQL env: GITHUB_TOKEN: ${{ github.token }} + RUNNER_TEMP: ${{ runner.temp }} run: | + cd $RUNNER_TEMP gh release download "v${CODEQL_CLI_VERSION}" --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip unzip -q codeql-linux64.zip - name: Update CodeQL formatting based on new CLI version + env: + RUNNER_TEMP: ${{ runner.temp }} run: | - find cpp -name '*.ql' -or -name '*.qll' | xargs --max-procs "$XARGS_MAX_PROCS" --max-args 1 codeql/codeql query format --in-place - find c -name '*.ql' -or -name '*.qll' | xargs --max-procs "$XARGS_MAX_PROCS" --max-args 1 codeql/codeql query format --in-place + find cpp \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" $RUNNER_TEMP/codeql/codeql query format --in-place + find c \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" $RUNNER_TEMP/codeql/codeql query format --in-place - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: - title: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_standard_library_commit }}" - body: "This PR upgrades the CodeQL CLI version to ${{ github.event.inputs.codeql_cli_version }} and the `github/codeql` version to ${{ github.event.inputs.codeql_standard_library_commit }}." - commit-message: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_standard_library_commit }}" - team-reviewers: github/codeql-coding-standards + title: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_cli_version }}" + body: "This PR upgrades the CodeQL CLI version to ${{ github.event.inputs.codeql_cli_version }}." + commit-message: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_cli_version }}" delete-branch: true branch: "codeql/upgrade-to-${{ github.event.inputs.codeql_cli_version }}"