Skip to content

Commit

Permalink
Merge pull request #12 from poulet42/refactor-args
Browse files Browse the repository at this point in the history
pass args to pnpm/action-setup instead of handling them here
  • Loading branch information
NullVoxPopuli authored Jun 5, 2023
2 parents 3e4d9b3 + a7203b5 commit bc4004f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

0 comments on commit bc4004f

Please sign in to comment.