Show warning instead of failure when cache is not reachable

This commit is contained in:
Ricardo Cino 2022-06-13 11:22:21 +00:00
parent eeb10cff27
commit dfc4b745b4
4 changed files with 13 additions and 6 deletions

View file

@ -107,7 +107,7 @@ export function isGhes(): boolean {
export function isCacheFeatureAvailable(): boolean {
if (!cache.isFeatureAvailable()) {
if (isGhes()) {
throw new Error(
core.warning(
'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 {