Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ try {
if (cacheFetchingResult) {
core.info(`${cacheFetchingResult} cache fetched!`);
core.setOutput("hit", "1");
core.saveState("CACHE_STATE", "hit");
if (cacheFetchingResult === keyString) {
core.saveState("CACHE_STATE", "hit");
}

if (cacheToolchain && skipBuildingToolchain) {
execSync("sed -i 's/ $(tool.*\\/stamp-compile)//;' Makefile");
Expand All @@ -42,5 +44,5 @@ try {
}
}
} catch (error) {
core.setFailed(error.message);
core.setFailed(error instanceof Error ? error.message : String(error));
}
4 changes: 2 additions & 2 deletions save.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ try {
core.debug(`Cache paths: ${paths.join(", ")}`);

const cacheId = await cache.saveCache(paths, keyString);
if (cacheId) {
if (cacheId > -1) {
core.info(`Cache saved with key: ${keyString} (id: ${cacheId})`);
}
} else {
core.debug("No paths configured for caching, skipping");
}
}
} catch (error) {
core.warning(error.message);
core.warning(error instanceof Error ? error.message : String(error));
}