Skip to content

Commit ff35ed9

Browse files
nlffritzy
authored andcommitted
chore: add installFlags input to provide more flags to npm install
1 parent 3526933 commit ff35ed9

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/node-integration.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: true
1414
type: string
1515
default: git
16+
installFlags:
17+
description: 'extra flags to pass to npm install'
18+
required: false
19+
type: string
20+
default: ''
1621

1722
workflow_dispatch:
1823
inputs:
@@ -26,6 +31,11 @@ on:
2631
required: true
2732
type: string
2833
default: git
34+
installFlags:
35+
description: 'extra flags to pass to npm install'
36+
required: false
37+
type: string
38+
default: ''
2939

3040
jobs:
3141
build-nodejs:
@@ -307,6 +317,9 @@ jobs:
307317
if (meta.install) {
308318
install_flags.push(meta.install.slice(1))
309319
}
320+
if [[ "${{ inputs.installFlags }}" != "" ]]; then
321+
install_flags.push("${{ inputs.installFlags }}")
322+
fi
310323
const context = JSON.parse(execSync(`npm show ${package} --json`))
311324
const test = meta.scripts ? meta.scripts.map((script) => `npm run ${script}`) : ['npm test']
312325

.github/workflows/release-integration.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,22 @@ on:
77
description: npm version to test
88
type: string
99
required: true
10+
installFlags:
11+
description: 'extra flags to pass to npm install'
12+
required: false
13+
type: string
14+
default: ''
1015
workflow_dispatch:
1116
inputs:
1217
npmVersion:
1318
description: npm version to test
1419
type: string
1520
required: true
21+
installFlags:
22+
description: 'extra flags to pass to npm install'
23+
required: false
24+
type: string
25+
default: ''
1626

1727
jobs:
1828
node-integration:
@@ -28,3 +38,4 @@ jobs:
2838
with:
2939
nodeVersion: ${{ matrix.nodeVersion }}
3040
npmVersion: ${{ inputs.npmVersion }}
41+
installFlags: ${{ inputs.installFlags }}

0 commit comments

Comments
 (0)