Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into releases/v3 #2034

Merged
merged 22 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d651fbc
change to node20 for all actions
nickfyson Nov 22, 2023
f2d0c2e
upgrade node type definitions
nickfyson Dec 7, 2023
5b19bef
change to node20 for all actions
nickfyson Dec 7, 2023
5b52b36
reintroduce PR check that confirm action can be still be compiled on …
nickfyson Dec 7, 2023
cc4fead
update version in various hardcoded locations
nickfyson Dec 7, 2023
3a9f6a8
update javascript files
nickfyson Dec 7, 2023
303dec0
fix choice of older node version to test
nickfyson Dec 7, 2023
bf51594
Update checked-in dependencies
github-actions[bot] Dec 7, 2023
95be4b2
add not about continuing testing on node 16
nickfyson Dec 7, 2023
0bc194e
switch check sarif action to node20
nickfyson Dec 11, 2023
1de8705
Merge branch 'main' into nickfyson/node-20
nickfyson Dec 12, 2023
691226e
Update changelog and version after v2.22.10
github-actions[bot] Dec 12, 2023
1bca5bf
Update checked-in dependencies
github-actions[bot] Dec 12, 2023
3c1878d
Merge pull request #2029 from github/mergeback/v2.22.10-to-main-305f6546
cklin Dec 12, 2023
b995212
Bump the actions group with 2 updates (#2024)
dependabot[bot] Dec 12, 2023
b974542
Merge branch 'main' into nickfyson/node-20
nickfyson Dec 13, 2023
ea1e72c
Update .github/workflows/pr-checks.yml
nickfyson Dec 13, 2023
6b5b958
remove dedundant single quotes from node version strings
nickfyson Dec 13, 2023
7898bc2
add pr check for node version consistency
nickfyson Dec 13, 2023
c757f9f
Apply suggestions from code review
nickfyson Dec 13, 2023
64e61ba
Merge pull request #2006 from github/nickfyson/node-20
nickfyson Dec 13, 2023
e2b5cc7
Update changelog for v3.22.11
github-actions[bot] Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/check-sarif/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ inputs:
Comma separated list of query ids that should NOT be included in this SARIF file.

runs:
using: node16
using: node20
main: index.js
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
71 changes: 69 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,39 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 45

strategy:
matrix:
node-types-version: [16.11, current] # run tests on 16.11 while CodeQL Action v2 is still supported

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Lint
run: npm run-script lint

- name: Update version of @types/node
if: matrix.node-types-version != 'current'
env:
NODE_TYPES_VERSION: ${{ matrix.node-types-version }}
run: |
# Export `NODE_TYPES_VERSION` so it's available to jq
export NODE_TYPES_VERSION="${NODE_TYPES_VERSION}"
contents=$(jq '.devDependencies."@types/node" = env.NODE_TYPES_VERSION' package.json)
echo "${contents}" > package.json
# Usually we run `npm install` on macOS to ensure that we pick up macOS-only dependencies.
# However we're not checking in the updated lockfile here, so it's fine to run
# `npm install` on Linux.
npm install

if [ ! -z "$(git status --porcelain)" ]; then
git config --global user.email "[email protected]"
git config --global user.name "github-actions[bot]"
# The period in `git add --all .` ensures that we stage deleted files too.
git add --all .
git commit -m "Use @types/node=${NODE_TYPES_VERSION}"
fi

- name: Check generated JS
run: .github/workflows/script/check-js.sh

Expand All @@ -45,7 +71,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 +96,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 +114,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.

## 3.22.11 - 13 Dec 2023

- [v3+ only] The CodeQL Action now runs on Node.js v20. [#2006](https://github.com/github/codeql-action/pull/2006)

## 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: node20
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: node20
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: node20
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.

2 changes: 1 addition & 1 deletion lib/codeql.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.

Loading
Loading