[ci] Change logic for saving caches: Github variable that decides what gets cached #19150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current situation:
that translate to either being in the
main
branch OR being in a repository different than duckdb/duckdb.This aims at achieving a few goals:
main
is a base branch Note: PR can use caches from base branches, but not the other way around, so base branches have more valueProposed change:
combined with defining, at the GitHub duckdb/duckdb repo or at the duckdb org level a variable (not a secret) shaped like:
This keeps 1, but improves from only
main
to either one of the currently active branches. This allows also more flexibility on introducing new branches (just a matter of adding one) or in moving branches out of support.This improves also on 2, given the same behaviour stays, but whoever forked DuckDB can control what wants / needs cached.
I have tested this change in my repository, both without a variable or with a different combination of branches, and seems to behave as intended