Skip to content

Commit d22ea64

Browse files
authored
refactor: set pipelines and local node versions equally (#331)
* refactor: set pipelines and local node equally * refactor: moved node version setup to init cache * refactor: removed the other unnecessary if condition * fix: added missing property
1 parent 8c05203 commit d22ea64

14 files changed

+13
-182
lines changed

.github/actions/npm-cache/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ description: "Initialize NPM Cache"
33
runs:
44
using: "composite"
55
steps:
6+
- name: Setup Node version equally to our local development version
7+
# pick the Node version to use and install it
8+
# https://github.com/actions/setup-node
9+
uses: actions/setup-node@v3
10+
with:
11+
node-version: 16
12+
13+
- name: Display node and npm version
14+
shell: bash
15+
run: |
16+
node --version
17+
npm --version
18+
619
- uses: actions/cache@v3
720
id: "npm-cache" # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
821
with:

.github/workflows/00-init.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,6 @@ jobs:
1414
- name: ⬇️ Checkout repo
1515
uses: actions/checkout@v3
1616

17-
- name: Setup node equally to our local development version
18-
if: steps.npm-cache.outputs.cache-hit != 'true'
19-
# pick the Node version to use and install it
20-
# https://github.com/actions/setup-node
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: 16
24-
25-
- name: Display node and npm version
26-
if: steps.npm-cache.outputs.cache-hit != 'true'
27-
run: |
28-
node --version
29-
npm --version
30-
3117
- name: 🔄 Init Cache Default
3218
uses: ./.github/actions/npm-cache
3319

.github/workflows/00-scan-secrets.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@ jobs:
1212
with:
1313
fetch-depth: 0
1414

15-
- name: Setup node equally to our local development version
16-
if: steps.npm-cache.outputs.cache-hit != 'true'
17-
# pick the Node version to use and install it
18-
# https://github.com/actions/setup-node
19-
uses: actions/setup-node@v3
20-
with:
21-
node-version: 16
22-
23-
- name: Display node and npm version
24-
if: steps.npm-cache.outputs.cache-hit != 'true'
25-
run: |
26-
node --version
27-
npm --version
28-
2915
- name: ↔ Extract branch name
3016
uses: ./.github/actions/extract-branch
3117
id: extract_branch

.github/workflows/01-build.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ jobs:
1111
- name: ⬇️ Checkout repo
1212
uses: actions/checkout@v3
1313

14-
- name: Setup node equally to our local development version
15-
if: steps.npm-cache.outputs.cache-hit != 'true'
16-
# pick the Node version to use and install it
17-
# https://github.com/actions/setup-node
18-
uses: actions/setup-node@v3
19-
with:
20-
node-version: 16
21-
22-
- name: Display node and npm version
23-
if: steps.npm-cache.outputs.cache-hit != 'true'
24-
run: |
25-
node --version
26-
npm --version
27-
2814
- name: 🔄 Init Cache
2915
uses: ./.github/actions/npm-cache
3016

.github/workflows/01-get-publish-version.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,6 @@ jobs:
2727
- name: ⬇ Checkout repo
2828
uses: actions/checkout@v3
2929

30-
- name: Setup node equally to our local development version
31-
if: steps.npm-cache.outputs.cache-hit != 'true'
32-
# pick the Node version to use and install it
33-
# https://github.com/actions/setup-node
34-
uses: actions/setup-node@v3
35-
with:
36-
node-version: 16
37-
38-
- name: Display node and npm version
39-
if: steps.npm-cache.outputs.cache-hit != 'true'
40-
run: |
41-
node --version
42-
npm --version
43-
4430
- name: 🔄 Init Cache
4531
uses: ./.github/actions/npm-cache
4632

.github/workflows/01-lint.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ jobs:
1111
- name: ⬇️ Checkout repo
1212
uses: actions/checkout@v3
1313

14-
- name: Setup node equally to our local development version
15-
if: steps.npm-cache.outputs.cache-hit != 'true'
16-
# pick the Node version to use and install it
17-
# https://github.com/actions/setup-node
18-
uses: actions/setup-node@v3
19-
with:
20-
node-version: 16
21-
22-
- name: Display node and npm version
23-
if: steps.npm-cache.outputs.cache-hit != 'true'
24-
run: |
25-
node --version
26-
npm --version
27-
2814
- name: 🔄 Init Cache
2915
uses: ./.github/actions/npm-cache
3016

.github/workflows/01-test.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ jobs:
1111
- name: ⬇️ Checkout repo
1212
uses: actions/checkout@v3
1313

14-
- name: Setup node equally to our local development version
15-
if: steps.npm-cache.outputs.cache-hit != 'true'
16-
# pick the Node version to use and install it
17-
# https://github.com/actions/setup-node
18-
uses: actions/setup-node@v3
19-
with:
20-
node-version: 16
21-
22-
- name: Display node and npm version
23-
if: steps.npm-cache.outputs.cache-hit != 'true'
24-
run: |
25-
node --version
26-
npm --version
27-
2814
- name: 🔄 Init Cache
2915
uses: ./.github/actions/npm-cache
3016

.github/workflows/02-deploy-gh-pages.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,6 @@ jobs:
2323
- name: ⬇ Checkout repo
2424
uses: actions/checkout@v3
2525

26-
- name: Setup node equally to our local development version
27-
if: steps.npm-cache.outputs.cache-hit != 'true'
28-
# pick the Node version to use and install it
29-
# https://github.com/actions/setup-node
30-
uses: actions/setup-node@v3
31-
with:
32-
node-version: 16
33-
34-
- name: Display node and npm version
35-
if: steps.npm-cache.outputs.cache-hit != 'true'
36-
run: |
37-
node --version
38-
npm --version
39-
4026
- name: 🔄 Init Cache
4127
uses: ./.github/actions/npm-cache
4228

.github/workflows/03-publish-packages.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,6 @@ jobs:
2424
- name: ⬇ Checkout repo
2525
uses: actions/checkout@v3
2626

27-
- name: Setup node equally to our local development version
28-
if: steps.npm-cache.outputs.cache-hit != 'true'
29-
# pick the Node version to use and install it
30-
# https://github.com/actions/setup-node
31-
uses: actions/setup-node@v3
32-
with:
33-
node-version: 16
34-
35-
- name: Display node and npm version
36-
if: steps.npm-cache.outputs.cache-hit != 'true'
37-
run: |
38-
node --version
39-
npm --version
40-
4127
- name: 🔄 Init Cache
4228
uses: ./.github/actions/npm-cache
4329

.github/workflows/99-add-url-comment.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ jobs:
1111
- name: ⬇ Checkout repo
1212
uses: actions/checkout@v3
1313

14-
- name: Setup node equally to our local development version
15-
if: steps.npm-cache.outputs.cache-hit != 'true'
16-
# pick the Node version to use and install it
17-
# https://github.com/actions/setup-node
18-
uses: actions/setup-node@v3
19-
with:
20-
node-version: 16
21-
22-
- name: Display node and npm version
23-
if: steps.npm-cache.outputs.cache-hit != 'true'
24-
run: |
25-
node --version
26-
npm --version
27-
2814
- name: 📡 Add comment
2915
uses: actions/github-script@v6
3016
with:

0 commit comments

Comments
 (0)