Add cache-provider: external to skip Gradle User Home caching (#1059)

Users relying on an external mechanism to save/restore Gradle User Home
(e.g. Develocity Artifact Cache) previously had to set cache-disabled:
true, which is confusing since caching isn't actually disabled — it's
just not managed by this action — and the Job Summary misleadingly
reported caching as "Disabled".

cache-provider: external skips Gradle User Home restore/save (same as
cache-disabled) but reports a distinct "External" status in the Job
Summary, explaining that caching is handled by another provider.

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Daz DeBoer
2026-08-25 09:44:41 -06:00
committed by GitHub
co-authored by Claude Sonnet 5
parent 4ca152ae04
commit 910b061d4d
11 changed files with 162 additions and 12 deletions
+7 -2
View File
@@ -175,14 +175,19 @@ export class CacheConfig {
case 'enhanced':
case '':
return CacheProvider.Enhanced
case 'external':
return CacheProvider.External
}
throw TypeError(`The value '${val}' is not valid for 'cache-provider'. Valid values are: [basic, enhanced].`)
throw TypeError(
`The value '${val}' is not valid for 'cache-provider'. Valid values are: [basic, enhanced, external].`
)
}
}
export enum CacheProvider {
Basic = 'basic',
Enhanced = 'enhanced'
Enhanced = 'enhanced',
External = 'external'
}
export enum CacheCleanupOption {