mirror of
https://github.com/actions/cache.git
synced 2026-03-01 08:11:03 +08:00
Compare commits
4 Commits
680135ea6f
...
7b15bef426
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b15bef426 | ||
|
|
5656298164 | ||
|
|
4e380d19e1 | ||
|
|
9efb3f33bc |
@ -223,6 +223,9 @@ A cache key can include any of the contexts, functions, literals, and operators
|
||||
|
||||
For example, using the [`hashFiles`](https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles) function allows you to create a new cache when dependencies change.
|
||||
|
||||
> [!NOTE]
|
||||
> The cache key is rendered during the restore stage, so can only depend on file state at that stage.
|
||||
|
||||
```yaml
|
||||
- uses: actions/cache@v5
|
||||
with:
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
with:
|
||||
path: |
|
||||
~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
```
|
||||
|
||||
### Windows
|
||||
@ -59,7 +59,7 @@
|
||||
with:
|
||||
path: |
|
||||
~\.bun
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
```
|
||||
|
||||
## C# - NuGet
|
||||
|
||||
Loading…
Reference in New Issue
Block a user