added more config filenames to cache key

This commit is contained in:
Jeff Dickey 2024-01-12 18:40:46 -06:00
parent 8866b01f2f
commit 5424b1f50b
No known key found for this signature in database
GPG key ID: 584DADE86724B407
4 changed files with 21 additions and 4 deletions

View file

@ -1,2 +1,5 @@
tasks.lint = "bun run lint"
tasks."lint:fix" = "bun run format:write"
[tools]
node = '20.10.0'

8
dist/index.js generated vendored
View file

@ -82030,7 +82030,13 @@ async function setEnvVars() {
async function restoreMiseCache() {
core.startGroup('Restoring mise cache');
const cachePath = (0, utils_1.miseDir)();
const fileHash = await glob.hashFiles(`**/.tool-versions\n**/.mise.toml`);
const fileHash = await glob.hashFiles([
`**/.config/mise/config.toml`,
`**/.mise.*.toml`,
`**/.mise.toml`,
`**/.mise/config.toml`,
`**/.tool-versions`
].join('\n'));
const prefix = core.getInput('cache_key_prefix') || 'mise-v0';
const primaryKey = `${prefix}-${getOS()}-${os.arch()}-${fileHash}`;
core.saveState('CACHE', core.getBooleanInput('cache_save') ?? true);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -51,7 +51,15 @@ async function setEnvVars(): Promise<void> {
async function restoreMiseCache(): Promise<void> {
core.startGroup('Restoring mise cache')
const cachePath = miseDir()
const fileHash = await glob.hashFiles(`**/.tool-versions\n**/.mise.toml`)
const fileHash = await glob.hashFiles(
[
`**/.config/mise/config.toml`,
`**/.mise.*.toml`,
`**/.mise.toml`,
`**/.mise/config.toml`,
`**/.tool-versions`
].join('\n')
)
const prefix = core.getInput('cache_key_prefix') || 'mise-v0'
const primaryKey = `${prefix}-${getOS()}-${os.arch()}-${fileHash}`