mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-03 18:53:18 +08:00
Adding support in cache package to check if Artifact Cache service is enabled or not (#1028)
* Added support to check if Artifact cache service is enabled or not.
* enablingForGHES
* added ACTIONS_CACHE_URL in fixtures
* Fix CI
* CI fix
* changed function name
* Function rename
* Updated release
* added test case
* Update RELEASES.md
* Lint errors
* lint
* linting
* lint
* update name to actions service
* Update packages/cache/src/internal/cacheUtils.ts
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
* review comments
* linting
* linting
* push to start CI
* Update RELEASES.md
* remove extra spaces
* reverting version update
* Revert "reverting version update"
This reverts commit af84eba61e.
* Update RELEASES.md
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
This commit is contained in:
10
packages/cache/src/cache.ts
vendored
10
packages/cache/src/cache.ts
vendored
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user