Skip to content

Commit 89a8b97

Browse files
committed
ci: upgrade actions to current supported majors
checkout v2->v4, setup-node v2.1.2->v4 (Node 22 + npm cache), codeql-action v1->v3 with explicit language and least-privilege permissions; drop the obsolete HEAD^2 checkout hack and Autobuild step that interpreted-language repos never needed.
1 parent 869bb1b commit 89a8b97

2 files changed

Lines changed: 22 additions & 38 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,18 @@ jobs:
1313
analyse:
1414
name: Analyse
1515
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
security-events: write
1619

1720
steps:
1821
- name: Checkout repository
19-
uses: actions/checkout@v2
20-
with:
21-
# We must fetch at least the immediate parents so that if this is
22-
# a pull request then we can checkout the head.
23-
fetch-depth: 2
24-
25-
# If this run was triggered by a pull request event, then checkout
26-
# the head of the pull request instead of the merge commit.
27-
- run: git checkout HEAD^2
28-
if: ${{ github.event_name == 'pull_request' }}
22+
uses: actions/checkout@v4
2923

30-
# Initializes the CodeQL tools for scanning.
3124
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@v1
33-
# Override language selection by uncommenting this and choosing your languages
34-
# with:
35-
# languages: go, javascript, csharp, python, cpp, java
36-
37-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
38-
# If this step fails, then you should remove it and run the build manually (see below)
39-
- name: Autobuild
40-
uses: github/codeql-action/autobuild@v1
41-
42-
# ℹ️ Command-line programs to run using the OS shell.
43-
# 📚 https://git.io/JvXDl
44-
45-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
46-
# and modify them (or add more) to build your code if your project
47-
# uses a compiled language
48-
49-
#- run: |
50-
# make bootstrap
51-
# make release
25+
uses: github/codeql-action/init@v3
26+
with:
27+
languages: javascript-typescript
5228

5329
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@v1
30+
uses: github/codeql-action/analyze@v3

.github/workflows/main.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ jobs:
88
name: Style checks
99

1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212

1313
- name: Setup Node.js environment
14-
uses: actions/setup-node@v2.1.2
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 22
1517

1618
- name: Install dependencies
1719
run: |
@@ -29,10 +31,13 @@ jobs:
2931
platform: ["chrome", "firefox"]
3032

3133
steps:
32-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v4
3335

3436
- name: Setup Node.js environment
35-
uses: actions/setup-node@v2.1.2
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: 22
40+
cache: npm
3641

3742
- name: Install dependencies
3843
run: npm ci
@@ -45,10 +50,13 @@ jobs:
4550
needs: [build]
4651

4752
steps:
48-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v4
4954

5055
- name: Setup Node.js environment
51-
uses: actions/setup-node@v2.1.2
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: 22
59+
cache: npm
5260

5361
- name: Install dependencies
5462
run: npm ci

0 commit comments

Comments
 (0)