Fix file hashing when saving cache

This commit is contained in:
Alex Rodionov 2024-03-01 10:45:45 -08:00
parent c7b4d0412f
commit 2eb83dc753
3 changed files with 3 additions and 9 deletions

5
dist/post/index.js vendored
View file

@ -95854,10 +95854,7 @@ async function saveCache(cacheConfig) {
try {
core.startGroup(`Save cache for ${cacheConfig.name}`)
const paths = cacheConfig.paths
const hash = await glob.hashFiles(
cacheConfig.files.join('\n'),
{ followSymbolicLinks: false }
)
const hash = await glob.hashFiles(cacheConfig.files.join('\n'))
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
console.log(`Attempting to save ${paths} cache to ${key}`)
await cache.saveCache(paths, key)