thrownewError('Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.');
thrownewError('Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.');
}
else{
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
thrownewError('Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.');
thrownewError('Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.');
}
else{
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
@ -105,19 +105,16 @@ export function isGhes(): boolean {
}
}
exportfunctionisCacheFeatureAvailable():boolean{
exportfunctionisCacheFeatureAvailable():boolean{
if(!cache.isFeatureAvailable()){
if(cache.isFeatureAvailable())returntrue;
if(isGhes()){
if(isGhes())
thrownewError(
thrownewError(
'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
);
);
}else{
core.warning(
core.warning(
'The runner was not able to contact the cache service. Caching will be skipped'
'The runner was not able to contact the cache service. Caching will be skipped'