Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to enable corepack #651

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
  • Loading branch information
SayakMukhopadhyay and styfle authored Jan 17, 2023
commit c7d2f5b7071d6358dac4033dcee5e66f06f7eadb
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ inputs:
cache-dependency-path:
description: 'Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.'
corepack:
description: 'Used to specify whether to enable Corepack. Set to true to enable all package managers or set it to one or more package manager names (separate package manager names by a space. Supported package manager names: npm, yarn, pnpm.'
description: 'Used to specify whether to enable Corepack. Set to true to enable all package managers or set it to one or more package manager names separated by a space. Supported package manager names: npm, yarn, pnpm.'
default: 'false'
# TODO: add input to control forcing to pull from cloud or dist.
# escape valve for someone having issues or needing the absolute latest which isn't cached yet
4 changes: 2 additions & 2 deletions docs/advanced-usage.md
Original file line number Diff line number Diff line change
@@ -360,7 +360,7 @@ NOTE: As per https://github.com/actions/setup-node/issues/49 you cannot use `sec
The always-auth input sets `always-auth=true` in .npmrc file. With this option set [npm](https://docs.npmjs.com/cli/v6/using-npm/config#always-auth)/yarn sends the authentication credentials when making a request to the registries.

## Enabling Corepack
You can enable [Corepack](https://github.com/nodejs/corepack) by using the `corepack` input. This will enable Corepack. You can then use `pnpm` and `yarn` commands in your project.
You can enable [Corepack](https://github.com/nodejs/corepack) by using the `corepack` input. You can then use `pnpm` and `yarn` commands in your project.

```yaml
steps:
@@ -373,7 +373,7 @@ steps:
run: yarn install --immutable
```

You can also pass package manager names instead if you want to enable corepack for specific package managers only.
You can also pass package manager names separated by a space to enable corepack for specific package managers only.

```yaml
steps: