Skip to content

Commit 4cd538e

Browse files
authored
Update actions usage in workflows (#98)
* Update actions usage in deploy workflow * Update actions usage in test workflow
1 parent d7fcc92 commit 4cd538e

File tree

2 files changed

+14
-34
lines changed

2 files changed

+14
-34
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616

17-
- name: Read .nvmrc
18-
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
19-
id: nvm
20-
21-
- name: Use Node.js (.nvmrc)
22-
uses: actions/setup-node@v2
23-
with:
24-
node-version: ${{ steps.nvm.outputs.NVMRC }}
25-
26-
- uses: actions/cache@v2
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
2719
with:
28-
path: ~/.npm
29-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
30-
restore-keys: |
31-
${{ runner.os }}-node-
20+
node-version-file: .nvmrc
21+
cache: npm
3222

3323
- name: Install Dependencies
3424
run: npm ci
@@ -43,7 +33,7 @@ jobs:
4333

4434
steps:
4535
- name: Trigger Website Staging Deployment
46-
uses: actions/github-script@v5
36+
uses: actions/github-script@v7
4737
with:
4838
github-token: ${{ secrets.USER_TOKEN }}
4939
script: |
@@ -55,7 +45,7 @@ jobs:
5545
});
5646
5747
- name: Trigger Website Production Deployment
58-
uses: actions/github-script@v5
48+
uses: actions/github-script@v7
5949
with:
6050
github-token: ${{ secrets.USER_TOKEN }}
6151
script: |
@@ -67,7 +57,7 @@ jobs:
6757
});
6858
6959
- name: Trigger API Staging Deployment
70-
uses: actions/github-script@v5
60+
uses: actions/github-script@v7
7161
with:
7262
github-token: ${{ secrets.USER_TOKEN }}
7363
script: |
@@ -79,7 +69,7 @@ jobs:
7969
});
8070
8171
- name: Trigger API Production Deployment
82-
uses: actions/github-script@v5
72+
uses: actions/github-script@v7
8373
with:
8474
github-token: ${{ secrets.USER_TOKEN }}
8575
script: |

.github/workflows/test.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717

18-
- name: Read .nvmrc
19-
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
20-
id: nvm
21-
22-
- name: Use Node.js (.nvmrc)
23-
uses: actions/setup-node@v2
24-
with:
25-
node-version: ${{ steps.nvm.outputs.NVMRC }}
26-
27-
- uses: actions/cache@v2
18+
- name: Use Node.js
19+
uses: actions/setup-node@v4
2820
with:
29-
path: ~/.npm
30-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
31-
restore-keys: |
32-
${{ runner.os }}-node-
21+
node-version-file: .nvmrc
22+
cache: npm
3323

3424
- name: Install Dependencies
3525
run: npm ci

0 commit comments

Comments
 (0)