Compare commits

...

3 Commits

Author SHA1 Message Date
leavesster 97227172fb
Merge 09158c28ef into 0a44ba7841 2024-09-19 21:48:20 +05:30
William Entriken 0a44ba7841
Correct version string (#1124) 2024-09-19 08:53:38 -05:00
yleaf 09158c28ef fix: add restore key for all package managers 2024-09-10 10:44:45 +08:00
2 changed files with 2 additions and 14 deletions

View File

@ -21,7 +21,7 @@ See [action.yml](action.yml)
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
# Version Spec of the version to use in SemVer notation. # Version Spec of the version to use in SemVer notation.
# It also admits such aliases as lts, latest, nightly and canary builds # It also admits such aliases as lts/*, latest, nightly and canary builds
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node # Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-version: '' node-version: ''

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));