mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-07 16:56:12 +02:00
Cache Gradle distributions downloaded for a particular version (#58)
- Cache is separate from (but similar to) the wrapper distribution cache - New 'distributions-cache-enabled' flag controls caching of all downloaded distributions (including wrapper distributions) - Deprecated the 'wrapper-cache-enabled' flag for removal in v2
This commit is contained in:
parent
e4ec586f46
commit
33e91b639d
6 changed files with 95 additions and 36 deletions
|
@ -107,7 +107,16 @@ export function extractGradleWrapperSlugFromDistUri(
|
|||
}
|
||||
|
||||
function isWrapperCacheDisabled(): boolean {
|
||||
return !github.inputBoolean('wrapper-cache-enabled', true)
|
||||
// Check if either 'distributions' or 'wrapper' cache has been disabled
|
||||
const wrapperCacheEnabled = github.inputBoolean(
|
||||
'wrapper-cache-enabled',
|
||||
true
|
||||
)
|
||||
const distributionsCacheEnabled = github.inputBoolean(
|
||||
'distributions-cache-enabled',
|
||||
true
|
||||
)
|
||||
return !wrapperCacheEnabled || !distributionsCacheEnabled
|
||||
}
|
||||
|
||||
function getCacheKey(wrapperSlug: string): string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue