Skip to content

Commit 2b7e106

Browse files
authored
Update actions usage in workflows (#7)
* Update actions usage in deploy-prod workflow * Update actions usage in deploy-staging workflow * Update actions usage in test workflow
1 parent 25f6f95 commit 2b7e106

File tree

3 files changed

+15
-45
lines changed

3 files changed

+15
-45
lines changed

.github/workflows/deployment-production.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,13 @@ jobs:
1515
NODE_OPTIONS: --unhandled-rejections=strict
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919

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

3626
- name: Install Dependencies
3727
run: npm ci

.github/workflows/deployment-staging.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,13 @@ jobs:
1515
NODE_OPTIONS: --unhandled-rejections=strict
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919

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

3626
- name: Install Dependencies
3727
run: npm ci

.github/workflows/test-workflow.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,13 @@ jobs:
1616
NODE_OPTIONS: --unhandled-rejections=strict
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020

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

3727
- name: Install Dependencies
3828
run: npm ci

0 commit comments

Comments
 (0)