Skip to content

Commit b374143

Browse files
authored
Merge pull request #2034 from github/update-v3.22.11-64e61baea
Merge main into releases/v3
2 parents 305f654 + e2b5cc7 commit b374143

File tree

172 files changed

+60197
-5380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+60197
-5380
lines changed

.github/actions/check-sarif/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ inputs:
1616
Comma separated list of query ids that should NOT be included in this SARIF file.
1717
1818
runs:
19-
using: node16
19+
using: node20
2020
main: index.js

.github/update-release-branch.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,13 @@ def main():
255255
print(f'No commits to merge from {source_branch} to {target_branch}.')
256256
return
257257

258+
# define distinct prefix in order to support specific pr checks on backports
259+
branch_prefix = 'update' if is_primary_release else 'backport'
260+
258261
# The branch name is based off of the name of branch being merged into
259262
# and the SHA of the branch being merged from. Thus if the branch already
260263
# exists we can assume we don't need to recreate it.
261-
new_branch_name = f'update-v{version}-{source_branch_short_sha}'
264+
new_branch_name = f'{branch_prefix}-v{version}-{source_branch_short_sha}'
262265
print(f'Branch name is {new_branch_name}.')
263266

264267
# Check if the branch already exists. If so we can abort as this script

.github/workflows/debug-artifacts-failure.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ jobs:
3939
uses: ./.github/actions/prepare-test
4040
with:
4141
version: latest
42-
- uses: actions/setup-go@v4
42+
- uses: actions/setup-go@v5
4343
with:
4444
go-version: ^1.13.1
4545
- name: Setup Python on MacOS
46-
uses: actions/setup-python@v4
46+
uses: actions/setup-python@v5
4747
if: |
4848
matrix.os == 'macos-latest' && (
4949
matrix.version == 'stable-20220908' ||

.github/workflows/debug-artifacts.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646
uses: ./.github/actions/prepare-test
4747
with:
4848
version: ${{ matrix.version }}
49-
- uses: actions/setup-go@v4
49+
- uses: actions/setup-go@v5
5050
with:
5151
go-version: ^1.13.1
5252
- name: Setup Python on MacOS
53-
uses: actions/setup-python@v4
53+
uses: actions/setup-python@v5
5454
if: |
5555
matrix.os == 'macos-latest' && (
5656
matrix.version == 'stable-20220908' ||

.github/workflows/pr-checks.yml

+69-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,39 @@ jobs:
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 45
1717

18+
strategy:
19+
matrix:
20+
node-types-version: [16.11, current] # run tests on 16.11 while CodeQL Action v2 is still supported
21+
1822
steps:
1923
- name: Checkout
2024
uses: actions/checkout@v4
2125

2226
- name: Lint
2327
run: npm run-script lint
2428

29+
- name: Update version of @types/node
30+
if: matrix.node-types-version != 'current'
31+
env:
32+
NODE_TYPES_VERSION: ${{ matrix.node-types-version }}
33+
run: |
34+
# Export `NODE_TYPES_VERSION` so it's available to jq
35+
export NODE_TYPES_VERSION="${NODE_TYPES_VERSION}"
36+
contents=$(jq '.devDependencies."@types/node" = env.NODE_TYPES_VERSION' package.json)
37+
echo "${contents}" > package.json
38+
# Usually we run `npm install` on macOS to ensure that we pick up macOS-only dependencies.
39+
# However we're not checking in the updated lockfile here, so it's fine to run
40+
# `npm install` on Linux.
41+
npm install
42+
43+
if [ ! -z "$(git status --porcelain)" ]; then
44+
git config --global user.email "github-actions@github.com"
45+
git config --global user.name "github-actions[bot]"
46+
# The period in `git add --all .` ensures that we stage deleted files too.
47+
git add --all .
48+
git commit -m "Use @types/node=${NODE_TYPES_VERSION}"
49+
fi
50+
2551
- name: Check generated JS
2652
run: .github/workflows/script/check-js.sh
2753

@@ -45,7 +71,7 @@ jobs:
4571
uses: actions/checkout@v4
4672

4773
- name: Set up Python
48-
uses: actions/setup-python@v4
74+
uses: actions/setup-python@v5
4975
with:
5076
python-version: 3.11
5177

@@ -70,7 +96,7 @@ jobs:
7096

7197
steps:
7298
- name: Setup Python on MacOS
73-
uses: actions/setup-python@v4
99+
uses: actions/setup-python@v5
74100
if: |
75101
matrix.os == 'macos-latest' && (
76102
matrix.version == 'stable-20220908' ||
@@ -88,3 +114,44 @@ jobs:
88114
# we won't be able to find them on Windows.
89115
npm config set script-shell bash
90116
npm test
117+
118+
check-node-version:
119+
if: ${{ github.event.pull_request }}
120+
name: Check Action Node versions
121+
runs-on: ubuntu-latest
122+
timeout-minutes: 45
123+
env:
124+
BASE_REF: ${{ github.base_ref }}
125+
126+
steps:
127+
- uses: actions/checkout@v4
128+
- id: head-version
129+
name: Verify all Actions use the same Node version
130+
run: |
131+
NODE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
132+
echo "NODE_VERSION: ${NODE_VERSION}"
133+
if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then
134+
echo "::error::More than one node version used in 'action.yml' files."
135+
exit 1
136+
fi
137+
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
138+
139+
- id: checkout-base
140+
name: 'Backport: Check out base ref'
141+
if: ${{ startsWith(github.head_ref, 'backport-') }}
142+
uses: actions/checkout@v4
143+
with:
144+
ref: ${{ env.BASE_REF }}
145+
146+
- name: 'Backport: Verify Node versions unchanged'
147+
if: steps.checkout-base.outcome == 'success'
148+
env:
149+
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
150+
run: |
151+
BASE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
152+
echo "HEAD_VERSION: ${HEAD_VERSION}"
153+
echo "BASE_VERSION: ${BASE_VERSION}"
154+
if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then
155+
echo "::error::Cannot change the Node version of an Action in a backport PR."
156+
exit 1
157+
fi

.github/workflows/python-deps.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

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

154-
- uses: actions/setup-python@v4
154+
- uses: actions/setup-python@v5
155155
with:
156156
python-version: ${{ matrix.python_version }}
157157

.github/workflows/python312-windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: windows-latest
1919

2020
steps:
21-
- uses: actions/setup-python@v4
21+
- uses: actions/setup-python@v5
2222
with:
2323
python-version: 3.12
2424

.github/workflows/rebuild.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
npm run build
3232
3333
- name: Set up Python
34-
uses: actions/setup-python@v4
34+
uses: actions/setup-python@v5
3535
with:
3636
python-version: 3.11
3737

.github/workflows/update-supported-enterprise-server-versions.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Setup Python
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.7"
2020
- name: Checkout CodeQL Action

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

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

5+
## 3.22.11 - 13 Dec 2023
6+
7+
- [v3+ only] The CodeQL Action now runs on Node.js v20. [#2006](https://github.com/github/codeql-action/pull/2006)
8+
59
## 2.22.10 - 12 Dec 2023
610

711
- Update default CodeQL bundle version to 2.15.4. [#2016](https://github.com/github/codeql-action/pull/2016)

analyze/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ outputs:
8484
sarif-id:
8585
description: The ID of the uploaded SARIF file.
8686
runs:
87-
using: "node16"
87+
using: node20
8888
main: "../lib/analyze-action.js"
8989
post: "../lib/analyze-action-post.js"

autobuild/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ inputs:
1313
$GITHUB_WORKSPACE as its working directory.
1414
required: false
1515
runs:
16-
using: 'node16'
16+
using: node20
1717
main: '../lib/autobuild-action.js'

init/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ outputs:
109109
codeql-path:
110110
description: The path of the CodeQL binary used for analysis
111111
runs:
112-
using: 'node16'
112+
using: node20
113113
main: '../lib/init-action.js'
114114
post: '../lib/init-action-post.js'

lib/autobuild.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post-helper.test.js

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)