From d284bff1116919da438bb5aa359c7e792da44d26 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Tue, 5 Mar 2024 10:11:40 +0100 Subject: [PATCH] ci: decrease the github ci cache storage (#186) We limit the cache to the main branch, to decrease the number of created cache while ci actions on pr. --- .github/workflows/coverage.yml | 3 +++ .github/workflows/rust.yml | 4 +++- .github/workflows/web.yml | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) 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