1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-02-04 10:09:29 +02:00
Martin Geisler 8ed4d48aa5
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.
2024-04-08 18:04:42 +02:00

15 lines
493 B
YAML

name: Setup Rust cache
description: Configure the rust-cache workflow.
runs:
using: composite
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 == '') }}