mirror of
https://gitea.com/actions/setup-node.git
synced 2024-11-22 01:59:32 +01:00
Update 0001-support-caching-deps-for-monorepos.md
This commit is contained in:
parent
5aa72c249a
commit
3c1fbef7d3
1 changed files with 4 additions and 4 deletions
|
@ -23,8 +23,8 @@ The second option looks more generic because it allows to:
|
||||||
|
|
||||||
## Decision
|
## Decision
|
||||||
|
|
||||||
Add `deps-lock-file` input that will accept path (relative to repository root) to dependencies lock file.
|
Add `package-lock-file` input that will accept path (relative to repository root) to dependencies lock file.
|
||||||
If provided path contains wildcards, the action will search all maching files and calculate common hash like `${{ hashFiles('**/packages.lock.json') }}` YAML construction does.
|
If provided path contains wildcards, the action will search all maching files and calculate common hash like `${{ hashFiles('**/package-lock.json') }}` YAML construction does.
|
||||||
The hash of provided matched files will be used as a part of cache key.
|
The hash of provided matched files will be used as a part of cache key.
|
||||||
|
|
||||||
Yaml examples:
|
Yaml examples:
|
||||||
|
@ -35,7 +35,7 @@ steps:
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
cache: npm
|
cache: npm
|
||||||
deps-lock-file: 'sub-project/package-lock.json'
|
package-lock-file: 'sub-project/package-lock.json'
|
||||||
```
|
```
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
|
@ -44,5 +44,5 @@ steps:
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
cache: yarn
|
cache: yarn
|
||||||
deps-lock-file: 'sub-project/**/yarn.lock'
|
package-lock-file: 'sub-project/**/yarn.lock'
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue