mirror of
https://github.com/actions/cache.git
synced 2026-03-01 08:11:03 +08:00
Compare commits
4 Commits
bffb663af6
...
8133792058
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8133792058 | ||
|
|
5656298164 | ||
|
|
4e380d19e1 | ||
|
|
0e22a2cc98 |
21
examples.md
21
examples.md
@ -22,6 +22,7 @@
|
||||
- [Java - Maven](#java---maven)
|
||||
- [Node - npm](#node---npm)
|
||||
- [Node - Lerna](#node---lerna)
|
||||
- [Node - pnpm](#node---pnpm)
|
||||
- [Node - Yarn](#node---yarn)
|
||||
- [Node - Yarn 2](#node---yarn-2)
|
||||
- [OCaml/Reason - esy](#ocamlreason---esy)
|
||||
@ -49,7 +50,7 @@
|
||||
with:
|
||||
path: |
|
||||
~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
```
|
||||
|
||||
### Windows
|
||||
@ -59,7 +60,7 @@
|
||||
with:
|
||||
path: |
|
||||
~\.bun
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
```
|
||||
|
||||
## C# - NuGet
|
||||
@ -374,6 +375,22 @@ After [deprecation](https://github.blog/changelog/2022-10-11-github-actions-depr
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
|
||||
```
|
||||
|
||||
## Node - pnpm
|
||||
|
||||
```yaml
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
```
|
||||
|
||||
## Node - Yarn
|
||||
The yarn cache directory will depend on your operating system and version of `yarn`. See https://yarnpkg.com/lang/en/docs/cli/cache/ for more info.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user