Github actions caches don't update already existing caches, so the cache that gets loaded could be old. This sets a new cache using a cache key derived from a hash of files. The use of restore-keys: bazel-cache- will find the most recent cache stored scoped to this branch or a parent branch.
Updated. @alexeagle I wrote a more verbose (but hopefully clearer) explanation. @f0rmiga I removed the cache location flags outside of the bazelrc file as it doesn't support environment variables.
@alexeagle
Github actions caches don't update already existing caches, so the cache that gets loaded could be old. This sets a new cache using a cache key derived from a hash of files. The use of
restore-keys: bazel-cache-
will find the most recent cache stored scoped to this branch or a parent branch.