Skip to content

Commit

Permalink
feat(pnpm-install): add version and args inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 26, 2022
1 parent 82c0f67 commit 604590f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,27 @@ Will use every patch update within `v2.1.x`.

1. Runs [actions/setup-node]
2. Installs pnpm
4. Handles pnpm cache
5. Runs `pnpm install --frozen-lockfile`
3. Handles pnpm cache
4. Runs `pnpm install --frozen-lockfile`

##### Example

```yaml
- uses: myparcelnl/actions/pnpm-install@v2
with:
node-version: 16
pnpm-version: 7.4.0
pnpm-args: --ignore-scripts --frozen-lockfile
```

##### Inputs

| required | name | description | Example | Default |
|----------|----------------|------------------------------------|--------------------------------------|---------------------|
| No | `node-version` | The Node.js version to use | `16` | `16` |
| No | `pnpm-version` | The pnpm version to use | `7.4.0` | `7.6.0` |
| No | `pnpm-args` | Arguments to use with pnpm install | `--ignore-scripts --frozen-lockfile` | `--frozen-lockfile` |

#### ~~setup-node~~

> ⚠️ Deprecated: use actions/setup-node@v3 instead.
Expand Down
14 changes: 12 additions & 2 deletions pnpm-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ inputs:
default: '16'
required: false

pnpm-version:
description: 'The pnpm version to use'
default: '7.6.0'
required: false

pnpm-args:
description: 'Arguments to use with pnpm install'
default: '--frozen-lockfile'
required: false

runs:
using: composite
steps:
Expand All @@ -18,7 +28,7 @@ runs:

- uses: pnpm/action-setup@v2.2.2
with:
version: 7
version: ${{ inputs.pnpm-version }}
run_install: false

- name: 'Get pnpm store directory'
Expand All @@ -37,4 +47,4 @@ runs:
- name: 'Install pnpm dependencies'
shell: bash
run: pnpm install --frozen-lockfile
run: pnpm install ${{ inputs.pnpm-args }}

0 comments on commit 604590f

Please sign in to comment.