1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-05-04 09:19:55 +02:00

fix: Output chache hit timing

This commit is contained in:
Ryo Mimura 2024-06-21 00:09:16 +09:00
parent 688d5d4688
commit 6f5b5ee729
2 changed files with 2 additions and 2 deletions

View file

@ -51,6 +51,7 @@ export async function restoreImpl(
);
if (!cacheKey) {
core.setOutput(Outputs.CacheHit, false.toString());
if (failOnCacheMiss) {
throw new Error(
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`
@ -62,7 +63,6 @@ export async function restoreImpl(
...restoreKeys
].join(", ")}`
);
core.setOutput(Outputs.CacheHit, false.toString());
return;
}