1
0
Fork 0
mirror of https://github.com/actions/cache.git synced 2024-09-19 09:26:43 +00:00

Add Bun example

This commit is contained in:
Jan T. Sott 2024-08-29 23:02:34 +02:00
parent 81382a721f
commit e3a9678429
2 changed files with 23 additions and 0 deletions

View file

@ -158,6 +158,7 @@ Every programming language and framework has its own way of caching.
See [Examples](examples.md) for a list of `actions/cache` implementations for use with:
* [Bun](./examples.md#bun)
* [C# - NuGet](./examples.md#c---nuget)
* [Clojure - Lein Deps](./examples.md#clojure---lein-deps)
* [D - DUB](./examples.md#d---dub)

View file

@ -1,5 +1,6 @@
# Examples
- [Bun](#bun)
- [C# - NuGet](#c---nuget)
- [Clojure - Lein Deps](#clojure---lein-deps)
- [D - DUB](#d---dub)
@ -41,6 +42,27 @@
- [Swift - Mint](#swift---mint)
- [* - Bazel](#---bazel)
## Bun
```yaml
- uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
```
### Windows
```yaml
- uses: actions/cache@v4
with:
path: |
~\.deno
~\AppData\Local\deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
```
## C# - NuGet
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):