Fix cache-hit state boolean cast

This commit is contained in:
rak
2025-03-18 23:08:20 +01:00
parent 2875322ba9
commit 6e3ec0f06d
3 changed files with 10 additions and 3 deletions

View File

@@ -138,10 +138,15 @@ export async function save(id: string) {
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
const cacheHit = core.getState(STATE_CACHE_HIT);
core.info(
`Cache-hit state: ${cacheHit}`
);
if (!primaryKey) {
core.warning('Error retrieving key from state.');
return;
} else if (!!cacheHit) {
}
if (!!cacheHit || cacheHit !== 'false') {
// no change in target directories
core.info(
`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`