8000 Merge pull request #2036 from github/backport-v2.22.11-b374143c1 · github/codeql-action@03e7845 · GitHub
[go: up one dir, main page]

Skip to content

Commit 03e7845

Browse files
authored
Merge pull request #2036 from github/backport-v2.22.11-b374143c1
Merge releases/v3 into releases/v2
2 parents 305f654 + 54f1007 commit 03e7845

23 files changed

+157
-109
lines changed

.github/update-release-branch.py

Lines changed: 4 additions & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
uses: actions/checkout@v4
4646

4747
- name: Set up Python
48-
uses: actions/setup-python@v4
48+
uses: actions/setup-python@v5
4949
with:
5050
python-version: 3.11
5151

@@ -70,7 +70,7 @@ jobs:
7070

7171
steps:
7272
- name: Setup Python on MacOS
73-
uses: actions/setup-python@v4< 2364 /span>
73+
uses: actions/setup-python@v5
7474
if: |
7575
matrix.os == 'macos-latest' && (
7676
matrix.version == 'stable-20220908' ||
@@ -88,3 +88,44 @@ jobs:
8888
# we won't be able to find them on Windows.
8989
npm config set script-shell bash
9090
npm test
91+
92+
check-node-version:
93+
if: ${{ github.event.pull_request }}
94+
name: Check Action Node versions
95+
runs-on: ubuntu-latest
96+
timeout-minutes: 45
97+
env:
98+
BASE_REF: ${{ github.base_ref }}
99+
100+
steps:
101+
- uses: actions/checkout@v4
102+
- id: head-version
103+
name: Verify all Actions use the same Node version
104+
run: |
105+
NODE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
106+
echo "NODE_VERSION: ${NODE_VERSION}"
107+
if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then
108+
echo "::error::More than one node version used in 'action.yml' files."
109+
exit 1
110+
fi
111+
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
112+
113+
- id: checkout-base
114+
name: 'Backport: Check out base ref'
115+
if: ${{ startsWith(github.head_ref, 'backport-') }}
116+
uses: actions/checkout@v4
117+
with:
118+
ref: ${{ env.BASE_REF }}
119+
120+
- name: 'Backport: Verify Node versions unchanged'
121+
if: steps.checkout-base.outcome == 'success'
122+
env:
123+
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
124+
run: |
125+
BASE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
126+
echo "HEAD_VERSION: ${HEAD_VERSION}"
127+
echo "BASE_VERSION: ${BASE_VERSION}"
128+
if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then
129+
echo "::error::Cannot change the Node version of an Action in a backport PR."
130+
exit 1
131+
fi

.github/workflows/python-deps.yml

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 0 deletions
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+
## 2.22.11 - 13 Dec 2023
6+
7+
No user facing changes.
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

Lines changed: 1 addition & 1 deletion
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: node16
8888
main: "../lib/analyze-action.js"
8989
post: "../lib/analyze-action-post.js"

autobuild/action.yml

Lines changed: 1 addition & 1 deletion
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: node16
1717
main: '../lib/autobuild-action.js'

init/action.yml

Lines changed: 1 addition & 1 deletion
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: node16
113113
main: '../lib/init-action.js'
114114
post: '../lib/init-action-post.js'

lib/autobuild.js

Lines changed: 3 additions & 3 deletions
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

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0