Skip to content

Commit

Permalink
feat: PLT-000 Add parametrisation for NPM version (not mandatory) (#52)
Browse files Browse the repository at this point in the history
* test Mo

* Npm version fixed

* Npm version parametrized
  • Loading branch information
robgutsopedra committed Nov 30, 2023
1 parent 4c6938c commit 184d571
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ts_open-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,20 @@ on:
node_version:
required: false
type: string
default: "16.x"
description: "Node version used in the pipeline, defaults to 16.x"
default: "18.x"
description: "Node version used in the pipeline, defaults to 18.x"
npm_version:
required: false
type: string
description: "Npm version used in the pipeline, defaults to 10"

env:
TEST_COMMAND: ${{ inputs.test_command }}
BUILD_COMMAND: ${{ inputs.build_command }}
LINT_COMMAND: ${{ inputs.lint_command }}
NPM_INSTALL_COMMAND: ${{ inputs.npm_install_command }}
NODE_VERSION: ${{ inputs.node_version }}
NPM_VERSION: ${{ inputs.npm_version }}


jobs:
Expand All @@ -51,10 +56,14 @@ jobs:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: npm install
if: ${{ env.NPM_VERSION }}
run: npm i -g npm@${{ env.NPM_VERSION }} --registry=https://registry.npmjs.org

- name: Export Home
run: echo "HOME=/root" >> $GITHUB_ENV

Expand Down

0 comments on commit 184d571

Please sign in to comment.