File tree 4 files changed +40
-21
lines changed
4 files changed +40
-21
lines changed Original file line number Diff line number Diff line change 1
- name : " CodeQL"
1
+ name : CodeQL
2
2
3
3
on :
4
4
push :
25
25
language : [ 'javascript' ]
26
26
27
27
steps :
28
- - name : Checkout repository
29
- uses : actions/checkout@v3
28
+ - name : checkout
29
+ uses :
actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected]
30
30
31
31
# Initializes the CodeQL tools for scanning.
32
32
- name : Initialize CodeQL
Original file line number Diff line number Diff line change @@ -10,14 +10,20 @@ jobs:
10
10
lint :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2
13
+ - uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
14
14
15
- - uses : actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # pin@v3
15
+ # check the node version from the .node-version file
16
+ - name : fetch node version
17
+ id : node-version
18
+ run : |
19
+ version=$(cat .node-version)
20
+ echo "version=${version}" >> $GITHUB_OUTPUT
21
+
22
+ - name : setup node
23
+ uses :
actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected]
16
24
with :
17
- path : ~/.npm
18
- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
19
- restore-keys : |
20
- ${{ runner.os }}-node-
25
+ node-version : ${{ steps.node-version.outputs.version }}
26
+ cache : ' npm'
21
27
22
28
- name : install dependencies
23
29
run : npm ci
Original file line number Diff line number Diff line change @@ -12,15 +12,22 @@ jobs:
12
12
runs-on : ubuntu-latest
13
13
14
14
steps :
15
- - uses : actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
15
+ - uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
16
16
17
- - name : Setup Node.js 18.x
18
- uses :
actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # [email protected]
17
+ # check the node version from the .node-version file
18
+ - name : fetch node version
19
+ id : node-version
20
+ run : |
21
+ version=$(cat .node-version)
22
+ echo "version=${version}" >> $GITHUB_OUTPUT
23
+
24
+ - name : setup node
25
+ uses :
actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected]
19
26
with :
20
- node-version : 18.x
27
+ node-version : ${{ steps.node-version.outputs.version }}
21
28
cache : ' npm'
22
29
23
- - name : Install dependencies
30
+ - name : install dependencies
24
31
run : npm ci
25
32
26
33
- name : Rebuild the dist/ directory
36
43
id : diff
37
44
38
45
# If index.js was different than expected, upload the expected version as an artifact
39
- - uses : actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # pin@v2
46
+ - uses : actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2
40
47
if : ${{ failure() && steps.diff.conclusion == 'failure' }}
41
48
with :
42
49
name : dist
Original file line number Diff line number Diff line change @@ -10,14 +10,20 @@ jobs:
10
10
test :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2
13
+ - uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
14
14
15
- - uses : actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # pin@v3
15
+ # check the node version from the .node-version file
16
+ - name : fetch node version
17
+ id : node-version
18
+ run : |
19
+ version=$(cat .node-version)
20
+ echo "version=${version}" >> $GITHUB_OUTPUT
21
+
22
+ - name : setup node
23
+ uses :
actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected]
16
24
with :
17
- path : ~/.npm
18
- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
19
- restore-keys : |
20
- ${{ runner.os }}-node-
25
+ node-version : ${{ steps.node-version.outputs.version }}
26
+ cache : ' npm'
21
27
22
28
- name : install dependencies
23
29
run : npm ci
You can’t perform that action at this time.
0 commit comments