Skip to content

Commit 17cb2b8

Browse files
committed
use env for node version
1 parent 612a999 commit 17cb2b8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/offlinedocs.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- "offlinedocs/**"
1212
workflow_dispatch:
1313

14+
env:
15+
NODE_VERSION: 16.20.1
16+
1417
# Cancel in-progress runs for pull requests when developers push
1518
# additional changes
1619
concurrency:
@@ -25,6 +28,13 @@ jobs:
2528
- name: Checkout
2629
uses: actions/checkout@v3
2730

31+
- name: Setup Node
32+
uses: buildjet/setup-node@v3
33+
with:
34+
node-version: env.NODE_VERSION
35+
cache: "yarn"
36+
cache-dependency-path: "offlinedocs/yarn.lock"
37+
2838
- name: Install Pretier
2939
run: |
3040
cd offlinedocs
@@ -48,7 +58,7 @@ jobs:
4858
- name: Setup Node
4959
uses: buildjet/setup-node@v3
5060
with:
51-
node-version: 16.20.1
61+
node-version: env.NODE_VERSION
5262
cache: "yarn"
5363
cache-dependency-path: "offlinedocs/yarn.lock"
5464

@@ -67,7 +77,7 @@ jobs:
6777
- name: Setup Node
6878
uses: buildjet/setup-node@v3
6979
with:
70-
node-version: 16.20.1
80+
node-version: env.NODE_VERSION
7181
cache: "yarn"
7282
cache-dependency-path: "offlinedocs/yarn.lock"
7383

0 commit comments

Comments
 (0)