mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-11-23 03:41:05 -05:00
Add example for Bazel
This commit is contained in:
parent
940f3d7cf1
commit
4b381be638
1 changed files with 15 additions and 0 deletions
15
examples.md
15
examples.md
|
@ -39,6 +39,7 @@
|
|||
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
|
||||
- [Swift - Swift Package Manager](#swift---swift-package-manager)
|
||||
- [Swift - Mint](#swift---mint)
|
||||
- [* - Bazel](#---bazel)
|
||||
|
||||
## C# - NuGet
|
||||
|
||||
|
@ -657,3 +658,17 @@ steps:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-mint-
|
||||
```
|
||||
|
||||
## * - Bazel
|
||||
|
||||
Bazel cache has a good handle to check if cached content should be rebuild or not based on its inputs like a hash(command + files). So using the latest cache of the branch is enough, no need to suffix with `hashFiles('**/...')`.
|
||||
|
||||
```yaml
|
||||
- name: Cache Bazel
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/bazelisk
|
||||
~/.cache/bazel
|
||||
key: ${{ runner.os }}-bazel
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue