Skip to content

Commit ce21993

Browse files
authored
Merge pull request #614 from per1234/engines_node
Use `engines.node` as source of version data for "actions/setup-node" action
2 parents a80ef98 + 3283fd3 commit ce21993

File tree

8 files changed

+18
-34
lines changed

8 files changed

+18
-34
lines changed

.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:
@@ -74,7 +70,7 @@ jobs:
7470
- name: Setup Node.js
7571
uses: actions/setup-node@v5
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@v5
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-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:
@@ -242,7 +238,7 @@ jobs:
242238
- name: Setup Node.js
243239
uses: actions/setup-node@v5
244240
with:
245-
node-version: ${{ env.NODE_VERSION }}
241+
node-version-file: package.json
246242

247243
- name: Install Task
248244
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:
@@ -71,7 +67,7 @@ jobs:
7167
- name: Setup Node.js
7268
uses: actions/setup-node@v5
7369
with:
74-
node-version: ${{ env.NODE_VERSION }}
70+
node-version-file: package.json
7571

7672
- name: Download JSON schema for Taskfiles
7773
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:
@@ -76,7 +72,7 @@ jobs:
7672
- name: Setup Node.js
7773
uses: actions/setup-node@v5
7874
with:
79-
node-version: ${{ env.NODE_VERSION }}
75+
node-version-file: package.json
8076

8177
- name: Install Task
8278
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:
@@ -36,7 +32,7 @@ jobs:
3632
- name: Setup Node.js
3733
uses: actions/setup-node@v5
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

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
@@ -38,7 +36,7 @@ jobs:
3836
- name: Setup Node.js
3937
uses: actions/setup-node@v5
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
@@ -132,7 +130,7 @@ jobs:
132130
- name: Setup Node.js
133131
uses: actions/setup-node@v5
134132
with:
135-
node-version: ${{ env.NODE_VERSION }}
133+
node-version-file: package.json
136134

137135
- name: Merge label configuration files
138136
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)