Skip to content

Commit 8661845

Browse files
authored
[FX-5294][FX-5252] Update Node.js versions in GH Actions (#316)
* Update build and push image GH Action * Update changeset versions * Update GH versions
1 parent a2ea2bc commit 8661845

File tree

15 files changed

+9763
-7478
lines changed

15 files changed

+9763
-7478
lines changed

.changeset/neat-forks-move.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'davinci-github-actions': major
3+
---
4+
5+
- drop support for Node.js@18; set Node.js@20 as the default version for all GitHub Actions.

.github/workflows/pr-checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ jobs:
4040
with:
4141
ref: ${{ github.event.pull_request.head.sha }}
4242

43-
- name: Set up Node.js 18.x
43+
- name: Set up Node.js 20
4444
uses: actions/[email protected]
4545
with:
46-
node-version: 18
46+
node-version: 20
4747

4848
- uses: ./yarn-install
4949

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- name: Set up node
5757
uses: actions/[email protected]
5858
with:
59-
node-version: 18
59+
node-version: 20
6060

6161
- uses: ./yarn-install
6262

build-publish-alpha-package/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The list of arguments, that are used in GH Action:
1919
| `npm-token` | string || | NPM token used for publishing. Has to be type Publish |
2020
| `branch` | string || | Name of the branch that will be published |
2121
| `root-folder` | string | | | Root folder of a package to be published |
22-
| `node-version` | string | | 18 | Node.js version used. The action is guaranteed to work only with Node.js@18 (default value) |
22+
| `node-version` | string | | 20 | Node.js version used. The action is guaranteed to work only with Node.js@20 (default value) |
2323

2424
### Outputs
2525

build-publish-alpha-package/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ inputs:
1717
description: 'Root folder of a package to be published || string'
1818
node-version:
1919
required: false
20-
default: 18
21-
description: 'Node.js version used. The action is guaranteed to work only with Node.js@18 (default value)'
20+
default: 20
21+
description: 'Node.js version used. The action is guaranteed to work only with Node.js@20 (default value)'
2222

2323
runs:
2424
using: composite
2525
steps:
2626
- name: Set up node
27-
uses: actions/setup-node@v3.2.0
27+
uses: actions/setup-node@v4.0.0
2828
with:
2929
node-version: ${{ inputs.node-version }}
3030

build-push-image/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The list of arguments, that are used in GH Action:
2020
| `build-args` | string || | Multiline string to describe build arguments that will be used during dockerization |
2121
| `docker-file` | string | | ./davinci/packages/ci/src/configs/docker/Dockerfile.gha-deploy | pathname to Docker file |
2222
| `davinci-branch` | string | | master | Custom davinci branch |
23-
| `node-version` | string | | 18 | Node.js version used. The action is guaranteed to work only with Node.js@18 (default value) |
23+
| `node-versionв` | string | | 20 | Node.js version used. The action is guaranteed to work only with Node.js@20 (default value) |
2424

2525
### Outputs
2626

build-push-image/action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ inputs:
2828
description: 'Custom davinci branch'
2929
required: false
3030
default: 'master'
31-
node-version:
31+
node-versionв:
3232
required: false
33-
default: 18
34-
description: 'Node.js version used. The action is guaranteed to work only with Node.js@18 (default value)'
33+
default: 20
34+
description: 'Node.js version used. The action is guaranteed to work only with Node.js@20 (default value)'
3535

3636
runs:
3737
using: composite
@@ -45,7 +45,7 @@ runs:
4545
ref: ${{ inputs.davinci-branch }}
4646

4747
- name: Set up node
48-
uses: actions/setup-node@v3.2.0
48+
uses: actions/setup-node@v4.0.0
4949
with:
5050
node-version: ${{ inputs.node-version }}
5151

build-push-release-image/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The list of arguments, that are used in GH Action:
1717
| `environment` | enum<<br/>`temploy`,<br/>`staging`,<br/>`production`,<br/>> | | staging | Used to determine additional procedures while creating a Docker image |
1818
| `dist-folder` | string | | ./dist | Path to the folder with the built project |
1919
| `scope` | string | | | Used to determine the scope of the built project. Usefull in multihost monorepo projects to build only one project. |
20+
| `node-version` | string | | 20 | Node.js version used. The action is guaranteed to work only with Node.js@20 (default value) |
2021

2122
### Outputs
2223

build-push-release-image/action.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ inputs:
2525
required: false
2626
default: ''
2727
description: Used to determine the scope of the built project. Usefull in multihost monorepo projects to build only one project.
28+
node-version:
29+
required: false
30+
default: 20
31+
description: 'Node.js version used. The action is guaranteed to work only with Node.js@20 (default value)'
2832

2933
runs:
3034
using: composite
3135
steps:
32-
- uses: toptal/davinci-github-actions/yarn-install@v6.0.0
36+
- uses: toptal/davinci-github-actions/yarn-install@v13.0.2
3337

3438
- name: Build
3539
shell: bash
@@ -42,11 +46,12 @@ runs:
4246
yarn lerna run build --scope=${{ inputs.scope}}
4347
fi
4448
45-
- uses: toptal/davinci-github-actions/build-push-image@v6.0.0
49+
- uses: toptal/davinci-github-actions/build-push-image@v14.0.0
4650
with:
4751
sha: ${{ inputs.sha }}
4852
image-name: ${{ inputs.repository-name }}-release
4953
environment: ${{ inputs.environment }}
54+
node-version: ${{ inputs.node-version }}
5055
docker-file: ./davinci/packages/ci/src/configs/docker/Dockerfile.gha-deploy
5156
build-args: |
5257
ENV_RUNTIME_ENTRYPOINT=./davinci/packages/ci/src/configs/docker/env-runtime.entrypoint.sh

deploy-storybook/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The list of arguments, that are used in GH Action:
2424
| `generate-types-command` | string | | false | Command to generate gql types |
2525
| `pr-number` | string | | | Event number of the original pr, in case event number or issue number is not present. . |
2626
| `checkout-token` | string | | | Repository checkout access token `GITHUB_TOKEN`. Required for self hosted runners |
27-
| `node-version` | string | | 18 | Node.js version used. The action is guaranteed to work only with Node.js@18 (default value) |
27+
| `node-version` | string | | 20 | Node.js version used. The action is guaranteed to work only with Node.js@20 (default value) |
2828

2929
### Outputs
3030

deploy-storybook/action.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ inputs:
5656
required: false
5757
node-version:
5858
required: false
59-
default: 18
60-
description: 'Node.js version used. The action is guaranteed to work only with Node.js@18 (default value)'
59+
default: 20
60+
description: 'Node.js version used. The action is guaranteed to work only with Node.js@20 (default value)'
6161

6262
runs:
6363
using: composite
6464
steps:
6565
- name: Set up node
66-
uses: actions/setup-node@v3
66+
uses: actions/setup-node@v4.0.0
6767
with:
6868
node-version: ${{ inputs.node-version }}
6969

@@ -107,10 +107,11 @@ runs:
107107
echo "pr_number=${{ inputs.pr-number }}" >> $GITHUB_OUTPUT
108108
109109
- name: Build and Push Storybook Image
110-
uses: toptal/davinci-github-actions/build-push-image@v6.0.0
110+
uses: toptal/davinci-github-actions/build-push-image@v14.0.0
111111
if: ${{ inputs.use-prebuilt-image == 'false' }}
112112
with:
113113
sha: ${{ inputs.sha }}
114+
node-version: ${{ inputs.node-version }}
114115
image-name: ${{ steps.repo.outputs.repository_name }}-storybook-release
115116
build-args: |
116117
DIST_FOLDER=${{ inputs.dist-folder }}

0 commit comments

Comments
 (0)