From 294980c27d76e11c0defadfa02b7b3cc57f1a26d Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Wed, 6 Sep 2023 23:22:09 +0200 Subject: [PATCH] fix: do not fallback to latest if pnpm version is missing --- .github/workflows/nx-cloud-agents.yml | 7 +++++-- .github/workflows/nx-cloud-main.yml | 7 +++++-- integration-tests/pnpm/package.json | 3 ++- package.json | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nx-cloud-agents.yml b/.github/workflows/nx-cloud-agents.yml index 244c331..c2c8aa2 100644 --- a/.github/workflows/nx-cloud-agents.yml +++ b/.github/workflows/nx-cloud-agents.yml @@ -103,10 +103,13 @@ jobs: # Install pnpm with exact version provided by consumer or fallback to latest - name: Install PNPM - if: steps.package_manager.outputs.name == 'pnpm' + if: steps.package_manager.outputs.name == 'pnpm' && inputs.pnpm-version != '' uses: pnpm/action-setup@v2 with: - version: ${{ inputs.pnpm-version || 'latest' }} + version: ${{ inputs.pnpm-version }} + - name: Install PNPM + if: steps.package_manager.outputs.name == 'pnpm' && inputs.pnpm-version == '' + uses: pnpm/action-setup@v2 - name: Print node/npm/yarn versions id: versions diff --git a/.github/workflows/nx-cloud-main.yml b/.github/workflows/nx-cloud-main.yml index 659cbb9..107d0f0 100644 --- a/.github/workflows/nx-cloud-main.yml +++ b/.github/workflows/nx-cloud-main.yml @@ -127,10 +127,13 @@ jobs: # Install pnpm with exact version provided by consumer or fallback to latest - name: Install PNPM - if: steps.package_manager.outputs.name == 'pnpm' + if: steps.package_manager.outputs.name == 'pnpm' && inputs.pnpm-version != '' uses: pnpm/action-setup@v2 with: - version: ${{ inputs.pnpm-version || 'latest' }} + version: ${{ inputs.pnpm-version }} + - name: Install PNPM + if: steps.package_manager.outputs.name == 'pnpm' && inputs.pnpm-version == '' + uses: pnpm/action-setup@v2 - name: Print node/npm/yarn versions id: versions diff --git a/integration-tests/pnpm/package.json b/integration-tests/pnpm/package.json index 729891a..2ca4cb9 100644 --- a/integration-tests/pnpm/package.json +++ b/integration-tests/pnpm/package.json @@ -50,5 +50,6 @@ "ts-jest": "29.1.0", "ts-node": "10.9.1", "typescript": "4.9.5" - } + }, + "packageManager": "pnpm@8.7.4" } diff --git a/package.json b/package.json index db1b060..2d066d1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "private": true, - "version": "0.13.0", + "version": "0.13.1", "description": "This package.json is here purely to control the version of the Action, in combination with https://github.com/JamesHenry/publish-shell-action" }