1
0
Fork 0
mirror of https://github.com/actions/setup-node synced 2024-11-14 01:22:40 +00:00

Update 0000-caching-dependencies.md

This commit is contained in:
Maxim Lobanov 2021-05-24 17:35:10 +03:00
parent 8c35c6c880
commit 5fddb2d510

View file

@ -30,6 +30,7 @@ We don't persue the goal to provide wide customization of caching in scope of `a
- if input contains wildcards (like `**/package-lock.json`), hash of multiple files will be used - if input contains wildcards (like `**/package-lock.json`), hash of multiple files will be used
- The hash of file provided in `package-lock-path` input will be used as cache key (the same approach like [actions/cache](https://github.com/actions/cache/blob/main/examples.md#node---npm) recommends) - The hash of file provided in `package-lock-path` input will be used as cache key (the same approach like [actions/cache](https://github.com/actions/cache/blob/main/examples.md#node---npm) recommends)
- The following key cache will be used `${{ runner.os }}-npm-${{ hashFiles('<package-lock-path>') }}` - The following key cache will be used `${{ runner.os }}-npm-${{ hashFiles('<package-lock-path>') }}`
- Action will cache global npm cache directory (retrieved via `npm config get cache`)
# Example of real use-cases # Example of real use-cases
Default use case when `package-lock.json` or `yarn.lock` are located in repository root: Default use case when `package-lock.json` or `yarn.lock` are located in repository root: