Skip to content

Commit e5385f8

Browse files
authored
Merge pull request #415 from per1234/engines_node
Use `engines.node` as source of version data for "actions/setup-node" action
2 parents d5cbccd + e49e01f commit e5385f8

10 files changed

+21
-45
lines changed

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

Lines changed: 1 addition & 5 deletions
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-action-metadata-task.md
22
name: Check Action Metadata
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
create:
@@ -67,7 +63,7 @@ jobs:
6763
- name: Setup Node.js
6864
uses: actions/setup-node@v5
6965
with:
70-
node-version: ${{ env.NODE_VERSION }}
66+
node-version-file: package.json
7167

7268
- name: Install Task
7369
uses: arduino/setup-task@v2

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

Lines changed: 2 additions & 6 deletions
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:
@@ -77,7 +73,7 @@ jobs:
7773
- name: Setup Node.js
7874
uses: actions/setup-node@v5
7975
with:
80-
node-version: ${{ env.NODE_VERSION }}
76+
node-version-file: package.json
8177

8278
- name: Initialize markdownlint-cli problem matcher
8379
uses: xt0rted/markdownlint-problem-matcher@v3
@@ -105,7 +101,7 @@ jobs:
105101
- name: Setup Node.js
106102
uses: actions/setup-node@v5
107103
with:
108-
node-version: ${{ env.NODE_VERSION }}
104+
node-version-file: package.json
109105

110106
- name: Install Task
111107
uses: arduino/setup-task@v2

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

Lines changed: 2 additions & 6 deletions
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
create:
@@ -72,7 +68,7 @@ jobs:
7268
- name: Setup Node.js
7369
uses: actions/setup-node@v5
7470
with:
75-
node-version: ${{ env.NODE_VERSION }}
71+
node-version-file: package.json
7672

7773
- name: Install Task
7874
uses: arduino/setup-task@v2
@@ -104,7 +100,7 @@ jobs:
104100
- name: Setup Node.js
105101
uses: actions/setup-node@v5
106102
with:
107-
node-version: ${{ env.NODE_VERSION }}
103+
node-version-file: package.json
108104

109105
- name: Install Task
110106
uses: arduino/setup-task@v2

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

Lines changed: 1 addition & 5 deletions
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
create:
@@ -245,7 +241,7 @@ jobs:
245241
- name: Setup Node.js
246242
uses: actions/setup-node@v5
247243
with:
248-
node-version: ${{ env.NODE_VERSION }}
244+
node-version-file: package.json
249245

250246
- name: Install Task
251247
uses: arduino/setup-task@v2

.github/workflows/check-taskfiles.yml

Lines changed: 1 addition & 5 deletions
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
create:
@@ -73,7 +69,7 @@ jobs:
7369
- name: Setup Node.js
7470
uses: actions/setup-node@v5
7571
with:
76-
node-version: ${{ env.NODE_VERSION }}
72+
node-version-file: package.json
7773

7874
- name: Download JSON schema for Taskfiles
7975
id: download-schema

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

Lines changed: 1 addition & 5 deletions
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-toc-task.md
22
name: Check ToC
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:
@@ -75,7 +71,7 @@ jobs:
7571
- name: Setup Node.js
7672
uses: actions/setup-node@v5
7773
with:
78-
node-version: ${{ env.NODE_VERSION }}
74+
node-version-file: package.json
7975

8076
- name: Install Task
8177
uses: arduino/setup-task@v2

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

Lines changed: 1 addition & 5 deletions
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-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:
@@ -38,7 +34,7 @@ jobs:
3834
- name: Setup Node.js
3935
uses: actions/setup-node@v5
4036
with:
41-
node-version: ${{ env.NODE_VERSION }}
37+
node-version-file: package.json
4238

4339
- name: Install Task
4440
uses: arduino/setup-task@v2

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels-npm.md
22
name: Sync Labels
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
CONFIGURATIONS_FOLDER: .github/label-configuration-files
8-
CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file-
9-
104
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
115
on:
126
push:
@@ -27,6 +21,10 @@ on:
2721
workflow_dispatch:
2822
repository_dispatch:
2923

24+
env:
25+
CONFIGURATIONS_FOLDER: .github/label-configuration-files
26+
CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file-
27+
3028
jobs:
3129
check:
3230
runs-on: ubuntu-latest
@@ -40,7 +38,7 @@ jobs:
4038
- name: Setup Node.js
4139
uses: actions/setup-node@v5
4240
with:
43-
node-version: ${{ env.NODE_VERSION }}
41+
node-version-file: package.json
4442

4543
- name: Download JSON schema for labels configuration file
4644
id: download-schema
@@ -139,7 +137,7 @@ jobs:
139137
- name: Setup Node.js
140138
uses: actions/setup-node@v5
141139
with:
142-
node-version: ${{ env.NODE_VERSION }}
140+
node-version-file: package.json
143141

144142
- name: Merge label configuration files
145143
run: |

package-lock.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
"markdown-toc": "1.2.0",
88
"markdownlint-cli": "0.37.0",
99
"prettier": "3.6.2"
10+
},
11+
"engines": {
12+
"node": "16.x"
1013
}
1114
}

0 commit comments

Comments
 (0)