You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: action.yml
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,13 @@ inputs:
25
25
description: 'Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.'
26
26
cache-dependency-path:
27
27
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.'
28
+
corepack:
29
+
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.'
30
+
default: 'false'
28
31
# TODO: add input to control forcing to pull from cloud or dist.
29
32
# escape valve for someone having issues or needing the absolute latest which isn't cached yet
30
33
outputs:
31
-
cache-hit:
34
+
cache-hit:
32
35
description: 'A boolean value to indicate if a cache was hit.'
Copy file name to clipboardExpand all lines: docs/advanced-usage.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -416,3 +416,32 @@ Please refer to the [Ensuring workflow access to your package - Configuring a pa
416
416
417
417
### always-auth input
418
418
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.
419
+
420
+
## Enabling Corepack
421
+
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.
422
+
423
+
```yaml
424
+
steps:
425
+
- uses: actions/checkout@v3
426
+
- uses: actions/setup-node@v3
427
+
with:
428
+
node-version: '16.x'
429
+
corepack: true
430
+
- name: Install dependencies
431
+
run: yarn install --immutable
432
+
```
433
+
434
+
You can also pass package manager names separated by a space to enable corepack for specific package managers only.
435
+
436
+
```yaml
437
+
steps:
438
+
- uses: actions/checkout@v3
439
+
- uses: actions/setup-node@v3
440
+
with:
441
+
node-version: '16.x'
442
+
corepack: yarn pnpm
443
+
- name: Install dependencies
444
+
run: yarn install --immutable
445
+
```
446
+
447
+
This option by default is `false` as Corepack is still in experimental phase.
0 commit comments