mirror of
https://github.com/actions/cache.git
synced 2025-04-23 14:30:49 +00:00
Add example for Bazel
This commit is contained in:
parent
3a696372f2
commit
94a01584db
1 changed files with 15 additions and 0 deletions
15
examples.md
15
examples.md
|
@ -32,6 +32,7 @@
|
||||||
- [Swift, Objective-C - Carthage](#swift-objective-c---carthage)
|
- [Swift, Objective-C - Carthage](#swift-objective-c---carthage)
|
||||||
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
|
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
|
||||||
- [Swift - Swift Package Manager](#swift---swift-package-manager)
|
- [Swift - Swift Package Manager](#swift---swift-package-manager)
|
||||||
|
- [* - Bazel](#---bazel)
|
||||||
|
|
||||||
## C# - NuGet
|
## C# - NuGet
|
||||||
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
|
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
|
||||||
|
@ -524,3 +525,17 @@ whenever possible:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-spm-
|
${{ runner.os }}-spm-
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## * - 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…
Add table
Reference in a new issue