This commit is contained in:
Roberto Tyley 2024-03-17 15:40:39 +07:00 committed by GitHub
commit 887947024c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 138787 additions and 4375 deletions

4453
dist/cleanup/index.js vendored

File diff suppressed because it is too large Load Diff

134247
dist/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

4453
dist/setup/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,8 @@ const supportedPackageManager: PackageManager[] = [
'**/*.sbt',
'**/project/build.properties',
'**/project/**.scala',
'**/project/**.sbt'
'**/project/**.sbt',
'!**/version.sbt' // releasing a new version of a library project shouldn't invalidate the entire sbt cache
]
}
];
@ -92,13 +93,15 @@ async function computeCacheKey(
const pattern = cacheDependencyPath
? cacheDependencyPath.trim().split('\n')
: packageManager.pattern;
const fileHash = await glob.hashFiles(pattern.join('\n'));
const fileHash = await glob.hashFiles(pattern.join('\n'), undefined, undefined, true);
if (!fileHash) {
throw new Error(
`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`
);
}
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`;
const cacheKey = `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`;
core.info(`cacheKey is ${cacheKey}`);
return cacheKey;
}
/**