Skip to content

Commit

Permalink
feat(yarn2-install): add yarn-args input
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Oct 24, 2022
1 parent 4cb7e27 commit aa09627
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,16 @@ For use with Yarn 2 (berry).
- uses: myparcelnl/actions/yarn2-install@v2
with:
node-version: 16
yarn-args: --immutable --immutable-cache
```

##### Inputs

| required | name | description | Example | Default |
|----------|----------------|------------------------------------|---------------------------------|---------|
| No | `node-version` | The Node.js version to use | `16` | `16` |
| No | `yarn-args` | Arguments to use with yarn install | `--immutable --immutable-cache` | ` ` |

#### pnpm-install

[Source](pnpm-install/action.yml)
Expand Down
11 changes: 8 additions & 3 deletions yarn2-install/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Install yarn 2 dependencies
description: Install yarn 2 dependencies from scratch or from cache
name: 'Install yarn 2 dependencies'
description: 'Install yarn 2 dependencies from scratch or from cache'

inputs:
node-version:
description: 'The Node.js version to use'
default: '16'
required: false

yarn-args:
description: 'Arguments to use with yarn install'
default: ''
required: false

runs:
using: composite
steps:
Expand All @@ -16,5 +21,5 @@ runs:
cache: 'yarn'

- name: 'Install yarn dependencies'
run: yarn install
run: yarn install ${{ inputs.yarn-args }}
shell: bash

0 comments on commit aa09627

Please sign in to comment.