added more config filenames to cache key
This commit is contained in:
parent
8866b01f2f
commit
5424b1f50b
4 changed files with 21 additions and 4 deletions
|
@ -1,2 +1,5 @@
|
||||||
|
tasks.lint = "bun run lint"
|
||||||
|
tasks."lint:fix" = "bun run format:write"
|
||||||
|
|
||||||
[tools]
|
[tools]
|
||||||
node = '20.10.0'
|
node = '20.10.0'
|
||||||
|
|
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
|
@ -82030,7 +82030,13 @@ async function setEnvVars() {
|
||||||
async function restoreMiseCache() {
|
async function restoreMiseCache() {
|
||||||
core.startGroup('Restoring mise cache');
|
core.startGroup('Restoring mise cache');
|
||||||
const cachePath = (0, utils_1.miseDir)();
|
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 prefix = core.getInput('cache_key_prefix') || 'mise-v0';
|
||||||
const primaryKey = `${prefix}-${getOS()}-${os.arch()}-${fileHash}`;
|
const primaryKey = `${prefix}-${getOS()}-${os.arch()}-${fileHash}`;
|
||||||
core.saveState('CACHE', core.getBooleanInput('cache_save') ?? true);
|
core.saveState('CACHE', core.getBooleanInput('cache_save') ?? true);
|
||||||
|
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
10
src/index.ts
10
src/index.ts
|
@ -51,7 +51,15 @@ async function setEnvVars(): Promise<void> {
|
||||||
async function restoreMiseCache(): Promise<void> {
|
async function restoreMiseCache(): Promise<void> {
|
||||||
core.startGroup('Restoring mise cache')
|
core.startGroup('Restoring mise cache')
|
||||||
const cachePath = miseDir()
|
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 prefix = core.getInput('cache_key_prefix') || 'mise-v0'
|
||||||
const primaryKey = `${prefix}-${getOS()}-${os.arch()}-${fileHash}`
|
const primaryKey = `${prefix}-${getOS()}-${os.arch()}-${fileHash}`
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue