mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-22 05:38:38 +02:00
Only save CI cache on main
branch (#1962)
When a PR restores the cache, it will find the most recent cache from the `main` branch. This cache should be mostly up to date. We are constantly at the 10 GB limit for our CI caches, so removing the extra caches from the many PR branches should ensure that we always have space for the `main` branch caches.
This commit is contained in:
parent
13336fc428
commit
8ed4d48aa5
@ -7,3 +7,8 @@ runs:
|
||||
steps:
|
||||
- name: Setup Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
# Only save the cache on the main branch to avoid PRs filling
|
||||
# up the cache. Further, only save it if we are working on the
|
||||
# English source (or if no language has been set).
|
||||
save-if: ${{ github.ref == 'refs/heads/main' && (matrix.language == 'en' || matrix.language == '') }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user