Support passing files to hash in repository-cache

This commit is contained in:
Alex Rodionov 2024-03-05 14:25:19 -08:00
parent 527d41d462
commit 5058960dd0
6 changed files with 60 additions and 23 deletions

View file

@ -178,8 +178,30 @@ Default `""`.
Enable [`repository_cache`][3] and store it on GitHub based on contents of `MODULE.bazel` and `WORKSPACE` files.
You can also pass a file (or list of files) which contents are used to calculate cache key.
Default `false`.
<details>
<summary>Examples</summary>
#### Store a single repository cache
```yaml
- uses: p0deje/setup-bazel@0.7.1
with:
repository-cache: true
```
#### Store a repository cache from a custom location
```yaml
- uses: p0deje/setup-bazel@0.7.1
with:
repository-cache: examples/gem/WORKSPACE
```
</details>
## Migrating from [`bazelbuild/setup-bazelisk`][6]
You can simply replace `bazelbuild/setup-bazelisk` action with `p0deje/setup-bazel`.