Skip to content

Commit 8c155c2

Browse files
committed
Add nodejs_version input to build proxies action and implement caching for node_modules
1 parent 5d7caa8 commit 8c155c2

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/actions/build-proxies/action.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ inputs:
2525
description: "Name of the Component to deploy"
2626
required: true
2727
default: 'api'
28+
nodejs_version:
29+
description: "Node.js version, set by the CI/CD pipeline workflow"
30+
required: true
2831

2932
runs:
3033
using: composite
@@ -34,7 +37,16 @@ runs:
3437
uses: actions/checkout@v4
3538
- uses: actions/setup-node@v4
3639
with:
37-
node-version: 24
40+
node-version: ${{ inputs.nodejs_version }}
41+
42+
- name: "Cache node_modules"
43+
uses: actions/cache@v4
44+
with:
45+
path: |
46+
**/node_modules
47+
key: ${{ runner.os }}-node-${{ inputs.nodejs_version }}-${{ hashFiles('**/package-lock.json') }}
48+
restore-keys: |
49+
${{ runner.os }}-node-${{ inputs.nodejs_version }}-
3850
3951
- name: Npm install
4052
working-directory: .

.github/workflows/stage-3-build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ jobs:
109109
runId: "${{ github.run_id }}"
110110
buildSandbox: true
111111
releaseVersion: ${{ github.head_ref || github.ref_name }}
112+
nodejs_version: ${{ inputs.nodejs_version }}

0 commit comments

Comments
 (0)