File tree Expand file tree Collapse file tree 15 files changed +69
-17
lines changed Expand file tree Collapse file tree 15 files changed +69
-17
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ inputs:
1515 default : ' false'
1616 node-version :
1717 description : ' Node.js version to use'
18- required : false
19- default : ' 23'
18+ required : true
2019
2120runs :
2221 using : ' composite'
Original file line number Diff line number Diff line change 1+ name : ' Read .nvmrc'
2+ description : ' Reads the .nvmrc file and outputs the node version'
3+ outputs :
4+ node_version :
5+ description : ' The Node.js version from .nvmrc'
6+ value : ${{ steps.nvm.outputs.NODE_VERSION }}
7+ runs :
8+ using : " composite"
9+ steps :
10+ - name : Read .nvmrc
11+ id : nvm
12+ run : echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
13+ shell : bash
Original file line number Diff line number Diff line change 99 pull_request :
1010 workflow_dispatch :
1111
12- env :
13- NODE_VERSION : ' 20'
14-
1512concurrency :
1613 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1714 cancel-in-progress : true
@@ -25,10 +22,13 @@ jobs:
2522 - name : Checkout repository
2623 uses : actions/checkout@v5
2724
25+ - id : nvm
26+ uses : ./.github/actions/read-nvmrc
27+
2828 - name : Setup Node.js
2929 uses : actions/setup-node@v6
3030 with :
31- node-version : ${{ env.NODE_VERSION }}
31+ node-version : ${{ steps.nvm.outputs.node_version }}
3232 cache : ' npm'
3333 cache-dependency-path : website/package-lock.json
3434
@@ -109,10 +109,13 @@ jobs:
109109 - name : Setup Pages
110110 uses : actions/configure-pages@v5
111111
112+ - id : nvm
113+ uses : ./.github/actions/read-nvmrc
114+
112115 - name : Setup Node.js
113116 uses : actions/setup-node@v6
114117 with :
115- node-version : ${{ env.NODE_VERSION }}
118+ node-version : ${{ steps.nvm.outputs.node_version }}
116119 cache : ' npm'
117120 cache-dependency-path : website/package-lock.json
118121
@@ -158,10 +161,13 @@ jobs:
158161 with :
159162 fetch-depth : 0
160163
164+ - id : nvm
165+ uses : ./.github/actions/read-nvmrc
166+
161167 - name : Setup Node.js
162168 uses : actions/setup-node@v6
163169 with :
164- node-version : ${{ env.NODE_VERSION }}
170+ node-version : ${{ steps.nvm.outputs.node_version }}
165171 cache : ' npm'
166172 cache-dependency-path : website/package-lock.json
167173
Original file line number Diff line number Diff line change 1616 - name : Git checkout
1717 uses : actions/checkout@v5
1818
19+ - id : nvm
20+ uses : ./.github/actions/read-nvmrc
21+
1922 - name : Frontend build
2023 uses : ./.github/actions/frontend-build
2124 with :
25+ node-version : ${{ steps.nvm.outputs.node_version }}
2226 test-build-commands : ' true'
Original file line number Diff line number Diff line change 1616 - name : Git checkout
1717 uses : actions/checkout@v5
1818
19+ - id : nvm
20+ uses : ./.github/actions/read-nvmrc
21+
1922 - name : Frontend build
2023 uses : ./.github/actions/frontend-build
2124 with :
25+ node-version : ${{ steps.nvm.outputs.node_version }}
2226 test-build-commands : ' true'
Original file line number Diff line number Diff line change 1616 - name : Git checkout
1717 uses : actions/checkout@v5
1818
19+ - id : nvm
20+ uses : ./.github/actions/read-nvmrc
21+
1922 - name : Frontend build
2023 uses : ./.github/actions/frontend-build
2124 with :
25+ node-version : ${{ steps.nvm.outputs.node_version }}
2226 test-build-commands : ' true'
Original file line number Diff line number Diff line change 1616 - name : Git checkout
1717 uses : actions/checkout@v5
1818
19+ - id : nvm
20+ uses : ./.github/actions/read-nvmrc
21+
1922 - name : Frontend build
2023 uses : ./.github/actions/frontend-build
2124 with :
25+ node-version : ${{ steps.nvm.outputs.node_version }}
2226 test-build-commands : ' true'
Original file line number Diff line number Diff line change 1616 - name : Git checkout
1717 uses : actions/checkout@v5
1818
19+ - id : nvm
20+ uses : ./.github/actions/read-nvmrc
21+
1922 - name : Frontend build
2023 uses : ./.github/actions/frontend-build
2124 with :
25+ node-version : ${{ steps.nvm.outputs.node_version }}
2226 test-build-commands : ' true'
Original file line number Diff line number Diff line change 1616 - name : Git checkout
1717 uses : actions/checkout@v5
1818
19+ - id : nvm
20+ uses : ./.github/actions/read-nvmrc
21+
1922 - name : Frontend build
2023 uses : ./.github/actions/frontend-build
2124 with :
25+ node-version : ${{ steps.nvm.outputs.node_version }}
2226 test-build-commands : ' true'
Original file line number Diff line number Diff line change 1616 - name : Git checkout
1717 uses : actions/checkout@v5
1818
19+ - id : nvm
20+ uses : ./.github/actions/read-nvmrc
21+
1922 - name : Frontend build and test
2023 uses : ./.github/actions/frontend-build
2124 with :
25+ node-version : ${{ steps.nvm.outputs.node_version }}
2226 run-prettier-check : ' true'
2327 run-tests : ' true'
2428 test-build-commands : ' false'
You can’t perform that action at this time.
0 commit comments