Skip to content

Commit 2288a5b

Browse files
committed
fix(eslint): adjust workflow too
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
1 parent 0d07c16 commit 2288a5b

1 file changed

Lines changed: 22 additions & 13 deletions

File tree

.github/workflows/eslint.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
name: Lint
22

3-
on: pull_request
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
48

59
permissions:
610
contents: read
711

8-
concurrency:
9-
group: eslint-${{ github.head_ref || github.run_id }}
12+
concurrency:
13+
group: lint-${{ github.head_ref || github.run_id }}
1014
cancel-in-progress: true
1115

1216
jobs:
13-
build:
17+
eslint:
1418
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
node-version: [14, 16, 18]
18-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
1919

20-
name: eslint
2120
steps:
2221
- name: Checkout
23-
uses: actions/checkout@v3
22+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2423

25-
- name: Set up node ${{ matrix.node-version }}
26-
uses: actions/setup-node@v3
24+
- name: Read package.json node and npm engines version
25+
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
26+
id: versions
2727
with:
28-
node-version: ${{ matrix.node-version }}
28+
fallbackNode: '^20'
29+
fallbackNpm: '^10'
30+
31+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
32+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3
33+
with:
34+
node-version: ${{ steps.versions.outputs.nodeVersion }}
35+
36+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
37+
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
2938

3039
- name: Install dependencies
3140
run: npm ci

0 commit comments

Comments
 (0)