diff --git a/packages/cache/src/cache.ts b/packages/cache/src/cache.ts index 6847cf0d..687984ad 100644 --- a/packages/cache/src/cache.ts +++ b/packages/cache/src/cache.ts @@ -43,6 +43,16 @@ function checkKey(key: string): void { } } +/** + * isFeatureAvailable to check the presence of Actions cache service + * + * @returns boolean return true if Actions cache service feature is available, otherwise false + */ + + export function isFeatureAvailable(): boolean { + return !!process.env['ACTIONS_CACHE_URL'] +} + /** * Restores cache from keys *