Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add restore key for all package managers #1128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
14 changes: 1 addition & 13 deletions src/cache-restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down