Compare commits

...

2 Commits

Author SHA1 Message Date
leavesster dc23da1528
Merge 09158c28ef into 97ca147735 2024-09-10 16:32:18 +03:00
yleaf 09158c28ef fix: add restore key for all package managers 2024-09-10 10:44:45 +08:00
1 changed files with 1 additions and 13 deletions

View File

@ -44,19 +44,7 @@ export const restoreCache = async (
core.saveState(State.CachePrimaryKey, primaryKey); core.saveState(State.CachePrimaryKey, primaryKey);
const isManagedByYarnBerry = await repoHasYarnBerryManagedDependencies( const cacheKey = await cache.restoreCache(cachePaths, primaryKey, [keyPrefix]);
packageManagerInfo,
cacheDependencyPath
);
let cacheKey: string | undefined;
if (isManagedByYarnBerry) {
core.info(
'All dependencies are managed locally by yarn3, the previous cache can be used'
);
cacheKey = await cache.restoreCache(cachePaths, primaryKey, [keyPrefix]);
} else {
cacheKey = await cache.restoreCache(cachePaths, primaryKey);
}
core.setOutput('cache-hit', Boolean(cacheKey)); core.setOutput('cache-hit', Boolean(cacheKey));