From de47bbcc6d53cfe1ec4f6d747bec6bd43efadf4e Mon Sep 17 00:00:00 2001 From: Mohamed Abdelazim Date: Thu, 30 Nov 2023 17:48:01 +0100 Subject: [PATCH] patch: VAC-1209 Add missing env var for npm version --- .github/workflows/cron_deploy-from-branch.yml | 1 + .github/workflows/cron_merged-pr.yml | 1 + .github/workflows/deploy-from-branch.yml | 1 + .github/workflows/exceptional_stage_deploy.yml | 9 +++++---- .github/workflows/merged-lib-pr.yml | 1 + .github/workflows/merged-pr.yml | 9 +++++---- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cron_deploy-from-branch.yml b/.github/workflows/cron_deploy-from-branch.yml index 49ab7d8..bc987b9 100644 --- a/.github/workflows/cron_deploy-from-branch.yml +++ b/.github/workflows/cron_deploy-from-branch.yml @@ -73,6 +73,7 @@ env: LINT_COMMAND: ${{ inputs.lint_command }} NPM_INSTALL_COMMAND: ${{ inputs.npm_install_command }} NODE_VERSION: ${{ inputs.node_version }} + NPM_VERSION: ${{ inputs.npm_version }} jobs: diff --git a/.github/workflows/cron_merged-pr.yml b/.github/workflows/cron_merged-pr.yml index 9b5b27c..44f65d4 100644 --- a/.github/workflows/cron_merged-pr.yml +++ b/.github/workflows/cron_merged-pr.yml @@ -88,6 +88,7 @@ env: TEST_COMMAND: ${{ inputs.test_command }} BUILD_COMMAND: ${{ inputs.build_command }} LINT_COMMAND: ${{ inputs.lint_command }} + NPM_VERSION: ${{ inputs.npm_version }} jobs: bump-release: diff --git a/.github/workflows/deploy-from-branch.yml b/.github/workflows/deploy-from-branch.yml index 38f3e82..0d4f81b 100644 --- a/.github/workflows/deploy-from-branch.yml +++ b/.github/workflows/deploy-from-branch.yml @@ -78,6 +78,7 @@ env: APP_NAMES: ${{ inputs.app_names }} NPM_INSTALL_COMMAND: ${{ inputs.npm_install_command }} NODE_VERSION: ${{ inputs.node_version }} + NPM_VERSION: ${{ inputs.npm_version }} jobs: diff --git a/.github/workflows/exceptional_stage_deploy.yml b/.github/workflows/exceptional_stage_deploy.yml index 7adca49..ae4c4a1 100644 --- a/.github/workflows/exceptional_stage_deploy.yml +++ b/.github/workflows/exceptional_stage_deploy.yml @@ -78,6 +78,7 @@ env: APP_NAMES: ${{ inputs.app_names }} NPM_INSTALL_COMMAND: ${{ inputs.npm_install_command }} NODE_VERSION: ${{ inputs.node_version }} + NPM_VERSION: ${{ inputs.npm_version }} jobs: @@ -98,16 +99,16 @@ jobs: 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 + - id: "image_name" name: "Get repo name and update IMAGE_NAME" run: |- IMAGE_NAME=$IMAGE_REPO"/"${{ github.event.repository.name }} echo "image_name=$IMAGE_NAME" >> $GITHUB_OUTPUT - - name: npm install - if: ${{ env.NPM_VERSION }} - run: npm i -g npm@${{ env.NPM_VERSION }} --registry=https://registry.npmjs.org - - id: "app_names" name: "Get app_names if necessary" run: |- diff --git a/.github/workflows/merged-lib-pr.yml b/.github/workflows/merged-lib-pr.yml index 573b115..a377a98 100644 --- a/.github/workflows/merged-lib-pr.yml +++ b/.github/workflows/merged-lib-pr.yml @@ -73,6 +73,7 @@ env: LINT_COMMAND: ${{ inputs.lint_command }} PUBLISH_COMMAND: ${{ inputs.publish_command }} CI: true + NPM_VERSION: ${{ inputs.npm_version }} jobs: bump-release: diff --git a/.github/workflows/merged-pr.yml b/.github/workflows/merged-pr.yml index 990bcb7..4cabcaf 100644 --- a/.github/workflows/merged-pr.yml +++ b/.github/workflows/merged-pr.yml @@ -93,6 +93,7 @@ env: TEST_COMMAND: ${{ inputs.test_command }} BUILD_COMMAND: ${{ inputs.build_command }} LINT_COMMAND: ${{ inputs.lint_command }} + NPM_VERSION: ${{ inputs.npm_version }} jobs: bump-release: @@ -123,10 +124,6 @@ jobs: 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: npm install if: ${{ env.NPM_VERSION }} run: npm i -g npm@${{ env.NPM_VERSION }} --registry=https://registry.npmjs.org @@ -176,6 +173,10 @@ jobs: 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 + - id: "image_name" name: "Get repo name and update IMAGE_NAME" run: |-