From 422e5245e4a6d0b5360abc26ddc28c3ea70b6e36 Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Thu, 20 Aug 2026 16:02:26 +0000 Subject: [PATCH] ci: Save cargo cache only from develop by default (#8063) --- .github/actions/cargo-cache/action.yml | 5 +++-- .github/workflows/reusable-build-test-config.yml | 1 - .github/workflows/reusable-clang-tidy.yml | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/actions/cargo-cache/action.yml b/.github/actions/cargo-cache/action.yml index 1923d8cf64..f716d3e4a4 100644 --- a/.github/actions/cargo-cache/action.yml +++ b/.github/actions/cargo-cache/action.yml @@ -20,9 +20,10 @@ inputs: required: false default: "" save-if: - description: "Condition for saving the cache after the job." + description: > + Condition for saving the cache after the job. Defaults to save only from develop branch required: false - default: "true" + default: ${{ github.ref == 'refs/heads/develop' }} runs: using: composite diff --git a/.github/workflows/reusable-build-test-config.yml b/.github/workflows/reusable-build-test-config.yml index 656e6ec85b..2846c3fb85 100644 --- a/.github/workflows/reusable-build-test-config.yml +++ b/.github/workflows/reusable-build-test-config.yml @@ -167,7 +167,6 @@ jobs: with: cache-directories: ${{ env.BUILD_DIR }}/corrosion key: ${{ inputs.config_name }} - save-if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/release') }} # two workspaces here because build artifacts are located in 2 places: # - crates/target when cargo is called directly # - build/cargo when cargo is called by cmake diff --git a/.github/workflows/reusable-clang-tidy.yml b/.github/workflows/reusable-clang-tidy.yml index 6847ff9b57..ac21c83ea0 100644 --- a/.github/workflows/reusable-clang-tidy.yml +++ b/.github/workflows/reusable-clang-tidy.yml @@ -63,7 +63,6 @@ jobs: uses: ./.github/actions/cargo-cache with: cache-directories: ${{ env.BUILD_DIR }}/corrosion - save-if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/release') }} workspaces: crates -> ../${{ env.BUILD_DIR }}/cargo - name: Setup Conan