Merge 09158c28ef into 32f57ac043
This commit is contained in:
commit
095ec11b68
1 changed files with 1 additions and 13 deletions
|
|
@ -47,19 +47,7 @@ export const restoreCache = async (
|
||||||
core.saveState(State.CachePrimaryKey, primaryKey);
|
core.saveState(State.CachePrimaryKey, primaryKey);
|
||||||
core.setOutput('cache-primary-key', primaryKey);
|
core.setOutput('cache-primary-key', 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));
|
||||||
core.setOutput('cache-matched-key', cacheKey);
|
core.setOutput('cache-matched-key', cacheKey);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue