From a7203b5880a52a58d33e3f043f2cf2d90a178aed Mon Sep 17 00:00:00 2001 From: Corentin PRUNE Date: Mon, 5 Jun 2023 13:17:13 +0200 Subject: [PATCH] pass args to pnpm/action-setup --- action.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index 0cd2dc4..2fd0a60 100644 --- a/action.yml +++ b/action.yml @@ -98,12 +98,19 @@ runs: echo "version=$__resolved_version__" >> $GITHUB_OUTPUT + - name: 'Remove lockfile' + shell: 'bash' + run: | + echo "Detected option --no-lockfile. Lockfile will be deleted before install." + rm -f pnpm-lock.yaml + if: ${{ inputs.no-lockfile == 'true' }} - name: 'Install pnpm' # this action aliases the major (via branch) to the latest full version # https://github.com/pnpm/action-setup/branches/all uses: pnpm/action-setup@v2 with: version: ${{ steps.resolved-pnpm.outputs.version }} + run_install: "{ args: ['${{ inputs.args }}'] }" - name: 'Setup node and the cache for pnpm' # this action aliases the major to the latest full version # https://github.com/actions/setup-node/tags @@ -112,12 +119,3 @@ runs: cache: 'pnpm' node-version: ${{ inputs.node-version }} registry-url: ${{ inputs.node-registry-url }} - - name: 'Install dependencies' - shell: 'bash' - run: | - if [[ "${{ inputs.no-lockfile }}" == "true" ]]; then - echo "Detected option --no-lockfile. Lockfile will be deleted before install." - rm -f pnpm-lock.yaml - fi - - pnpm install ${{ inputs.args }}