diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 5ad60f6..39a1f98 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -33,6 +33,9 @@ jobs: with: toolchain: stable - uses: Swatinem/rust-cache@v2 + with: + # To only cache runs from `master` + save-if: ${{ github.ref == 'refs/heads/main' }} - run: rustup component add llvm-tools-preview - name: Install grcov diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 889dd07..fda2c9b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -30,7 +30,9 @@ jobs: steps: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 - + with: + # To only cache runs from `master` + save-if: ${{ github.ref == 'refs/heads/main' }} - if: matrix.os == 'ubuntu-latest' uses: awalsh128/cache-apt-pkgs-action@latest with: diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 9963b21..6c6db90 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -17,6 +17,9 @@ jobs: steps: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 + with: + # To only cache runs from `master` + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Add components run: rustup component add clippy