ci: Save cargo cache only from develop by default (#8063)

This commit is contained in:
Sergey Kuznetsov
2026-08-20 16:02:26 +00:00
committed by GitHub
parent e3ba569187
commit 422e5245e4
3 changed files with 3 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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