Skip to content

Commit a1a96c4

Browse files
author
Andrzej Kurek
committed
feat: customize node version
1 parent 5e5e613 commit a1a96c4

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ With those four you can easily compose the deployment script for your needs.
1515
### build-frontend
1616

1717
```yaml
18-
uses: vuestorefront/storefront-deployment/build-frontend@v1
18+
uses: vuestorefront/storefront-deployment/build-frontend@v3
1919
with:
2020
project_name: ${{ secrets.PROJECT_NAME }}
2121
cloud_username: ${{ secrets.CLOUD_USERNAME }}
@@ -36,6 +36,7 @@ with:
3636
coveo_access_token: ${{ secrets.NEXT_PUBLIC_COVEO_ACCESS_TOKEN }}
3737
version: 2.3.0
3838
default_html_cache_control: ${{ vars.DEFAULT_HTML_CACHE_CONTROL || 'public, max-age=0, s-maxage=0, must-revalidate' }}
39+
node_version: 18
3940
```
4041
4142
**Input Parameters:**
@@ -59,11 +60,12 @@ with:
5960
- `coveo_tracking_id`: Coveo tracking id required for coveo integration. Optional field.
6061
- `version`: Version that will be used for docker image tag. Example: 2.3.0, 3.1.0-rc.1. If not passed, github.sha will be used
6162
- `default_html_cache_control`: Default cache control header value for SSR pages. If not passed, `public, max-age=0, s-maxage=15, must-revalidate` will be used.
63+
- `node_version`: Node version. Defaults to 18.
6264

6365
### build-middleware
6466

6567
```yaml
66-
uses: vuestorefront/storefront-deployment/build-middleware@v1
68+
uses: vuestorefront/storefront-deployment/build-middleware@v3
6769
with:
6870
project_name: ${{ secrets.PROJECT_NAME }}
6971
cloud_username: ${{ secrets.CLOUD_USERNAME }}
@@ -74,6 +76,7 @@ with:
7476
docker_registry_url: 'registry.vuestorefront.cloud'
7577
npm_registry: 'https://registrynpm.storefrontcloud.io'
7678
version: 2.3.0
79+
node_version: 18
7780
```
7881

7982
**Input Parameters:**
@@ -87,11 +90,12 @@ with:
8790
- `docker_registry_url`: URL to the Docker image registry. Optional field. Defaults to `registry.vuestorefront.cloud`.
8891
- `npm_registry`: URL to the private NPM registry. Optional field. Defaults to `https://registrynpm.storefrontcloud.io`.
8992
- `version`: Version that will be used for docker image tag. Example: 2.3.0, 3.1.0-rc.1. If not passed, github.sha will be used
93+
- `node_version`: Node version. Defaults to 18.
9094

9195
### deploy
9296

9397
```yaml
94-
uses: vuestorefront/storefront-deployment/deploy@v1
98+
uses: vuestorefront/storefront-deployment/deploy@v3
9599
with:
96100
project_name: ${{ secrets.PROJECT_NAME }}
97101
cloud_username: ${{ secrets.CLOUD_USERNAME }}

build-frontend/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,17 @@ inputs:
6666
description: 'Default cache control header value for SSR pages'
6767
required: false
6868
default: 'public, max-age=0, s-maxage=15, must-revalidate'
69+
node_version:
70+
description: 'Node version'
71+
required: false
72+
default: '18'
6973
runs:
7074
using: 'composite'
7175
steps:
7276
- name: Setup node
73-
uses: actions/setup-node@v3
77+
uses: actions/setup-node@v4
7478
with:
75-
node-version: 18.x
79+
node-version: ${{ inputs.node_version }}
7680
- name: Build and publish docker image (Next.js frontend)
7781
if: ${{ inputs.frontend == 'next' || inputs.frontend == 'nextjs' }}
7882
uses: elgohr/Publish-Docker-Github-Action@v5

build-middleware/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ inputs:
3030
version:
3131
description: 'Version of the app'
3232
required: false
33+
node_version:
34+
description: 'Node version'
35+
required: false
36+
default: '18'
3337
runs:
3438
using: "composite"
3539
steps:
3640
- name: Setup node
37-
uses: actions/setup-node@v3
41+
uses: actions/setup-node@v4
3842
with:
39-
node-version: 18.x
43+
node-version: ${{ inputs.node_version }}
4044
- name: Encode Basic Auth
4145
id: base64-auth
4246
shell: bash

0 commit comments

Comments
 (0)