Fix cache-hit state boolean cast
This commit is contained in:
3
dist/cleanup/index.js
vendored
3
dist/cleanup/index.js
vendored
@@ -96665,11 +96665,12 @@ function save(id) {
|
|||||||
// Inputs are re-evaluated before the post action, so we want the original key used for restore
|
// Inputs are re-evaluated before the post action, so we want the original key used for restore
|
||||||
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
|
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
|
||||||
const cacheHit = core.getState(STATE_CACHE_HIT);
|
const cacheHit = core.getState(STATE_CACHE_HIT);
|
||||||
|
core.info(`Cache-hit state: ${cacheHit}`);
|
||||||
if (!primaryKey) {
|
if (!primaryKey) {
|
||||||
core.warning('Error retrieving key from state.');
|
core.warning('Error retrieving key from state.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (!!cacheHit) {
|
if (!!cacheHit || cacheHit !== 'false') {
|
||||||
// no change in target directories
|
// no change in target directories
|
||||||
core.info(`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
|
core.info(`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
|
||||||
return;
|
return;
|
||||||
|
|||||||
3
dist/setup/index.js
vendored
3
dist/setup/index.js
vendored
@@ -131914,11 +131914,12 @@ function save(id) {
|
|||||||
// Inputs are re-evaluated before the post action, so we want the original key used for restore
|
// Inputs are re-evaluated before the post action, so we want the original key used for restore
|
||||||
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
|
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
|
||||||
const cacheHit = core.getState(STATE_CACHE_HIT);
|
const cacheHit = core.getState(STATE_CACHE_HIT);
|
||||||
|
core.info(`Cache-hit state: ${cacheHit}`);
|
||||||
if (!primaryKey) {
|
if (!primaryKey) {
|
||||||
core.warning('Error retrieving key from state.');
|
core.warning('Error retrieving key from state.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (!!cacheHit) {
|
if (!!cacheHit || cacheHit !== 'false') {
|
||||||
// no change in target directories
|
// no change in target directories
|
||||||
core.info(`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
|
core.info(`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -138,10 +138,15 @@ export async function save(id: string) {
|
|||||||
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
|
const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY);
|
||||||
const cacheHit = core.getState(STATE_CACHE_HIT);
|
const cacheHit = core.getState(STATE_CACHE_HIT);
|
||||||
|
|
||||||
|
core.info(
|
||||||
|
`Cache-hit state: ${cacheHit}`
|
||||||
|
);
|
||||||
|
|
||||||
if (!primaryKey) {
|
if (!primaryKey) {
|
||||||
core.warning('Error retrieving key from state.');
|
core.warning('Error retrieving key from state.');
|
||||||
return;
|
return;
|
||||||
} else if (!!cacheHit) {
|
}
|
||||||
|
if (!!cacheHit || cacheHit !== 'false') {
|
||||||
// no change in target directories
|
// no change in target directories
|
||||||
core.info(
|
core.info(
|
||||||
`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`
|
`${cacheHit}: Cache hit occurred on the primary key ${primaryKey}, not saving cache.`
|
||||||
|
|||||||
Reference in New Issue
Block a user