1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-05-01 15:59:54 +02:00

Merge branch 'main' into fix-345

This commit is contained in:
Álvaro Mondéjar Rubio 2022-06-27 12:37:35 +02:00
commit b70b470c47
64 changed files with 73207 additions and 52642 deletions

View file

@ -1,3 +1,4 @@
import * as cache from "@actions/cache";
import * as core from "@actions/core";
import { Outputs, RefKey, State } from "../constants";
@ -75,3 +76,20 @@ export function getInputAsInt(
}
return value;
}
export function isCacheFeatureAvailable(): boolean {
if (!cache.isFeatureAvailable()) {
if (isGhes()) {
logWarning(
"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 {
logWarning(
"An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."
);
}
return false;
}
return true;
}