-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/ci: refactor base caching pattern
We currently parameterise the setupGoActionsCaches template with an expression that guards proctected branches. However this concept is already well defined in base via isProtectedBranch. Therefore, remove the #protectedBranchExpr parameter. At the same time hoist some logic around the clearing of the testcache as part of the setup of the Go caches. This is otherwise repeated in every trybot workflow at least. For some workflows that want to reuse the Go cache template but _not_ clear the testcache. We solve this with two parameters: readonly and cleanTestCache. readonly explicitly states that we a workflow only wants to restore from the cache. cleanTestCache is defaulted based on the inverse of readonly, but is still guarded on us running on a protected branch. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Ia100955abdb8e6db3b89cbd04e1c914c51cd514c Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/551922 Unity-Result: CUEcueckoo <cueckoo@cuelang.org> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
- Loading branch information
Showing
2 changed files
with
64 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters