mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2024-12-24 11:35:48 +00:00
fix: add restore key for all package managers
This commit is contained in:
parent
1c7b2db920
commit
09158c28ef
1 changed files with 1 additions and 13 deletions
|
@ -44,19 +44,7 @@ export const restoreCache = async (
|
|||
|
||||
core.saveState(State.CachePrimaryKey, primaryKey);
|
||||
|
||||
const isManagedByYarnBerry = await repoHasYarnBerryManagedDependencies(
|
||||
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);
|
||||
}
|
||||
const cacheKey = await cache.restoreCache(cachePaths, primaryKey, [keyPrefix]);
|
||||
|
||||
core.setOutput('cache-hit', Boolean(cacheKey));
|
||||
|
||||
|
|
Loading…
Reference in a new issue