Skip to content

Commit

Permalink
Merge pull request #2036 from github/backport-v2.22.11-b374143c1
Browse files Browse the repository at this point in the history
Merge releases/v3 into releases/v2
  • Loading branch information
nickfyson committed Dec 13, 2023
2 parents 305f654 + 54f1007 commit 03e7845
Show file tree
Hide file tree
Showing 23 changed files with 157 additions and 109 deletions.
5 changes: 4 additions & 1 deletion .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ def main():
print(f'No commits to merge from {source_branch} to {target_branch}.')
return

# define distinct prefix in order to support specific pr checks on backports
branch_prefix = 'update' if is_primary_release else 'backport'

# The branch name is based off of the name of branch being merged into
# and the SHA of the branch being merged from. Thus if the branch already
# exists we can assume we don't need to recreate it.
new_branch_name = f'update-v{version}-{source_branch_short_sha}'
new_branch_name = f'{branch_prefix}-v{version}-{source_branch_short_sha}'
print(f'Branch name is {new_branch_name}.')

# Check if the branch already exists. If so we can abort as this script
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/debug-artifacts-failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
uses: ./.github/actions/prepare-test
with:
version: latest
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ^1.13.1
- name: Setup Python on MacOS
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20220908' ||
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/debug-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ jobs:
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ^1.13.1
- name: Setup Python on MacOS
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20220908' ||
Expand Down
45 changes: 43 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

Expand All @@ -70,7 +70,7 @@ jobs:

steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20220908' ||
Expand All @@ -88,3 +88,44 @@ jobs:
# we won't be able to find them on Windows.
npm config set script-shell bash
npm test
check-node-version:
if: ${{ github.event.pull_request }}
name: Check Action Node versions
runs-on: ubuntu-latest
timeout-minutes: 45
env:
BASE_REF: ${{ github.base_ref }}

steps:
- uses: actions/checkout@v4
- id: head-version
name: Verify all Actions use the same Node version
run: |
NODE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
echo "NODE_VERSION: ${NODE_VERSION}"
if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then
echo "::error::More than one node version used in 'action.yml' files."
exit 1
fi
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
- id: checkout-base
name: 'Backport: Check out base ref'
if: ${{ startsWith(github.head_ref, 'backport-') }}
uses: actions/checkout@v4
with:
ref: ${{ env.BASE_REF }}

- name: 'Backport: Verify Node versions unchanged'
if: steps.checkout-base.outcome == 'success'
env:
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
run: |
BASE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
echo "HEAD_VERSION: ${HEAD_VERSION}"
echo "BASE_VERSION: ${BASE_VERSION}"
if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then
echo "::error::Cannot change the Node version of an Action in a backport PR."
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/python-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20220908' ||
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python312-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
npm run build
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.7"
- name: Checkout CodeQL Action
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.

## 2.22.11 - 13 Dec 2023

No user facing changes.

## 2.22.10 - 12 Dec 2023

- Update default CodeQL bundle version to 2.15.4. [#2016](https://github.com/github/codeql-action/pull/2016)
Expand Down
2 changes: 1 addition & 1 deletion analyze/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ outputs:
sarif-id:
description: The ID of the uploaded SARIF file.
runs:
using: "node16"
using: node16
main: "../lib/analyze-action.js"
post: "../lib/analyze-action-post.js"
2 changes: 1 addition & 1 deletion autobuild/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ inputs:
$GITHUB_WORKSPACE as its working directory.
required: false
runs:
using: 'node16'
using: node16
main: '../lib/autobuild-action.js'
2 changes: 1 addition & 1 deletion init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ outputs:
codeql-path:
description: The path of the CodeQL binary used for analysis
runs:
using: 'node16'
using: node16
main: '../lib/init-action.js'
post: '../lib/init-action-post.js'
6 changes: 3 additions & 3 deletions lib/autobuild.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions lib/init-action-post-helper.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 03e7845

Please sign in to comment.