Fix file hashing when saving cache
This commit is contained in:
parent
c7b4d0412f
commit
2eb83dc753
3 changed files with 3 additions and 9 deletions
5
dist/post/index.js
vendored
5
dist/post/index.js
vendored
|
|
@ -95854,10 +95854,7 @@ async function saveCache(cacheConfig) {
|
||||||
try {
|
try {
|
||||||
core.startGroup(`Save cache for ${cacheConfig.name}`)
|
core.startGroup(`Save cache for ${cacheConfig.name}`)
|
||||||
const paths = cacheConfig.paths
|
const paths = cacheConfig.paths
|
||||||
const hash = await glob.hashFiles(
|
const hash = await glob.hashFiles(cacheConfig.files.join('\n'))
|
||||||
cacheConfig.files.join('\n'),
|
|
||||||
{ followSymbolicLinks: false }
|
|
||||||
)
|
|
||||||
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
|
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
|
||||||
console.log(`Attempting to save ${paths} cache to ${key}`)
|
console.log(`Attempting to save ${paths} cache to ${key}`)
|
||||||
await cache.saveCache(paths, key)
|
await cache.saveCache(paths, key)
|
||||||
|
|
|
||||||
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
5
post.js
5
post.js
|
|
@ -72,10 +72,7 @@ async function saveCache(cacheConfig) {
|
||||||
try {
|
try {
|
||||||
core.startGroup(`Save cache for ${cacheConfig.name}`)
|
core.startGroup(`Save cache for ${cacheConfig.name}`)
|
||||||
const paths = cacheConfig.paths
|
const paths = cacheConfig.paths
|
||||||
const hash = await glob.hashFiles(
|
const hash = await glob.hashFiles(cacheConfig.files.join('\n'))
|
||||||
cacheConfig.files.join('\n'),
|
|
||||||
{ followSymbolicLinks: false }
|
|
||||||
)
|
|
||||||
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
|
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
|
||||||
console.log(`Attempting to save ${paths} cache to ${key}`)
|
console.log(`Attempting to save ${paths} cache to ${key}`)
|
||||||
await cache.saveCache(paths, key)
|
await cache.saveCache(paths, key)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue