1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-06-07 14:50:24 +02:00

Only fail if no cache entry is found

This commit is contained in:
Marc Mueller 2023-01-09 16:03:44 +01:00
parent d05f7e6483
commit 155f8e7a3c
7 changed files with 13 additions and 21 deletions

View file

@ -69,12 +69,6 @@ async function restoreImpl(
);
core.setOutput(Outputs.CacheHit, isExactKeyMatch.toString());
if (!isExactKeyMatch && failOnCacheMiss) {
throw new Error(
`Restored cache key doesn't match the given input key. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`
);
}
core.info(`Cache restored from key: ${cacheKey}`);
return cacheKey;