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:
Shubham Tiwari
2022-03-25 14:40:02 +05:30
committed by GitHub
parent 39b9640642
commit b463992869
7 changed files with 33 additions and 11 deletions

View File

@@ -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
*