1
0
Fork 0
mirror of https://github.com/actions/cache.git synced 2025-07-16 21:27:54 +00:00

Add option to specify URL of cache server

This commit is contained in:
Sindri Guðmundsson 2021-11-04 09:45:24 +00:00 committed by Davíð Guðni
parent 611465405c
commit df46e813e6
6 changed files with 30 additions and 2 deletions

View file

@ -18,6 +18,13 @@ export function isExactKeyMatch(key: string, cacheKey?: string): boolean {
);
}
export function setActionsCacheUrl(): void {
const requestedCacheUrl = core.getInput("cache-url");
if (requestedCacheUrl) {
process.env.ACTIONS_CACHE_URL = requestedCacheUrl;
}
}
export function setCacheState(state: string): void {
core.saveState(State.CacheMatchedKey, state);
}