diff --git a/.bazelrc b/.bazelrc index 8724ec1da..f6e2f39c0 100644 --- a/.bazelrc +++ b/.bazelrc @@ -18,3 +18,6 @@ common --javacopt=-Xlint:-options # Remove flag once https://github.com/google/cel-spec/issues/508 and rules_jvm_external is fixed. common --incompatible_autoload_externally=proto_library,cc_proto_library,java_proto_library,java_test +# Limit repository cache size by not caching extracted repository contents +build --repo_contents_cache= + diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 94effd33b..8a34af31c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -30,7 +30,7 @@ jobs: # Avoid downloading Bazel every time. bazelisk-cache: true # Store build cache per workflow. - disk-cache: ${{ github.workflow }} + disk-cache: ${{ github.workflow }}-${{ github.job }} # Share repository cache between workflows. repository-cache: true # Prevent PRs from polluting cache @@ -60,7 +60,7 @@ jobs: # Avoid downloading Bazel every time. bazelisk-cache: true # Store build cache per workflow. - disk-cache: ${{ github.workflow }} + disk-cache: ${{ github.workflow }}-${{ github.job }} # Share repository cache between workflows. repository-cache: true # Prevent PRs from polluting cache @@ -95,7 +95,7 @@ jobs: # Avoid downloading Bazel every time. bazelisk-cache: true # Store build cache per workflow. - disk-cache: ${{ github.workflow }} + disk-cache: ${{ github.workflow }}-${{ github.job }} # Share repository cache between workflows. repository-cache: true # Never write to the cache, strictly read-only