Skip to content

Commit 3f582fd

Browse files
authored
Merge pull request #124 from per1234/engine
Use engines.node as source of version data for "actions/setup-node" action
2 parents b84856d + 8b17929 commit 3f582fd

9 files changed

+15
-35
lines changed

.github/workflows/check-markdown-task.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-markdown-task.md
22
name: Check Markdown
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
95
on:
106
create:
@@ -74,7 +70,7 @@ jobs:
7470
- name: Setup Node.js
7571
uses: actions/setup-node@v4
7672
with:
77-
node-version: ${{ env.NODE_VERSION }}
73+
node-version-file: package.json
7874

7975
- name: Initialize markdownlint-cli problem matcher
8076
uses: xt0rted/markdownlint-problem-matcher@v3
@@ -100,7 +96,7 @@ jobs:
10096
- name: Setup Node.js
10197
uses: actions/setup-node@v4
10298
with:
103-
node-version: ${{ env.NODE_VERSION }}
99+
node-version-file: package.json
104100

105101
- name: Install Task
106102
uses: arduino/setup-task@v2

.github/workflows/check-npm-task.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-npm-task.md
22
name: Check npm
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
95
on:
106
push:
@@ -46,7 +42,7 @@ jobs:
4642
- name: Setup Node.js
4743
uses: actions/setup-node@v4
4844
with:
49-
node-version: ${{ env.NODE_VERSION }}
45+
node-version-file: package.json
5046

5147
- name: Install Task
5248
uses: arduino/setup-task@v2
@@ -78,7 +74,7 @@ jobs:
7874
- name: Setup Node.js
7975
uses: actions/setup-node@v4
8076
with:
81-
node-version: ${{ env.NODE_VERSION }}
77+
node-version-file: package.json
8278

8379
- name: Install Task
8480
uses: arduino/setup-task@v2

.github/workflows/check-prettier-formatting-task.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-prettier-formatting-task.md
22
name: Check Prettier Formatting
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
95
on:
106
push:
@@ -216,7 +212,7 @@ jobs:
216212
- name: Setup Node.js
217213
uses: actions/setup-node@v4
218214
with:
219-
node-version: ${{ env.NODE_VERSION }}
215+
node-version-file: package.json
220216

221217
- name: Install Task
222218
uses: arduino/setup-task@v2

.github/workflows/check-taskfiles.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-taskfiles.md
22
name: Check Taskfiles
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
95
on:
106
push:
@@ -48,7 +44,7 @@ jobs:
4844
- name: Setup Node.js
4945
uses: actions/setup-node@v4
5046
with:
51-
node-version: ${{ env.NODE_VERSION }}
47+
node-version-file: package.json
5248

5349
- name: Download JSON schema for Taskfiles
5450
id: download-schema

.github/workflows/check-workflows-task.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/master/workflow-templates/check-workflows-task.md
22
name: Check Workflows
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
95
on:
106
push:
@@ -36,7 +32,7 @@ jobs:
3632
- name: Setup Node.js
3733
uses: actions/setup-node@v4
3834
with:
39-
node-version: ${{ env.NODE_VERSION }}
35+
node-version-file: package.json
4036

4137
- name: Install Task
4238
uses: arduino/setup-task@v2

.github/workflows/sync-labels-npm.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
name: Sync Labels
33

44
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
75
CONFIGURATIONS_FOLDER: .github/label-configuration-files
86
CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file-
97

@@ -38,7 +36,7 @@ jobs:
3836
- name: Setup Node.js
3937
uses: actions/setup-node@v4
4038
with:
41-
node-version: ${{ env.NODE_VERSION }}
39+
node-version-file: package.json
4240

4341
- name: Download JSON schema for labels configuration file
4442
id: download-schema
@@ -133,7 +131,7 @@ jobs:
133131
- name: Setup Node.js
134132
uses: actions/setup-node@v4
135133
with:
136-
node-version: ${{ env.NODE_VERSION }}
134+
node-version-file: package.json
137135

138136
- name: Merge label configuration files
139137
run: |

Taskfile.yml

-4
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,6 @@ tasks:
299299
sh: task utility:mktemp-file TEMPLATE="stylelintrc-schema-XXXXXXXXXX.json"
300300
INSTANCE_PATH: >-
301301
{{default .DEFAULT_NPM_PROJECT_PATH .PROJECT_PATH}}/package.json
302-
PROJECT_FOLDER:
303-
sh: pwd
304-
WORKING_FOLDER:
305-
sh: task utility:mktemp-folder TEMPLATE="dependabot-validate-XXXXXXXXXX"
306302
cmds:
307303
- wget --quiet --output-document="{{.SCHEMA_PATH}}" {{.SCHEMA_URL}}
308304
- wget --quiet --output-document="{{.AVA_SCHEMA_PATH}}" {{.AVA_SCHEMA_URL}}

package-lock.json

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
"markdown-link-check": "^3.13.7",
77
"markdownlint-cli": "^0.37.0",
88
"prettier": "^3.5.3"
9+
},
10+
"engines": {
11+
"node": "16.x"
912
}
1013
}

0 commit comments

Comments
 (0)