fix: use workspace-local mise dir on Windows for cache compatibility

@actions/cache uses @actions/glob internally to resolve cache paths,
which fails when the path is on a different drive than GITHUB_WORKSPACE.
On Windows CI runners, GITHUB_WORKSPACE is typically on D: while
LOCALAPPDATA (the previous default) is on C:, causing saveCache to
throw "Path Validation Error" on cold caches.

Default to GITHUB_WORKSPACE/.mise on Windows so the cache path is
always on the same drive as the workspace.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jdx 2026-04-11 14:22:01 +00:00
parent ac93c8a0e0
commit b8f8b694da
No known key found for this signature in database
GPG key ID: 584DADE86724B407
5 changed files with 20 additions and 25 deletions

View file

@ -47,6 +47,7 @@ jobs:
- name: Setup mise
uses: ./
with:
cache_key_prefix: mise-debug-v1
mise_toml: |
[tools]
jq = "1.7.1"
@ -55,6 +56,7 @@ jobs:
MY_ENV_VAR = "abc"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTIONS_STEP_DEBUG: true
- run: mise --version
- run: mise x jq -- jq --version
- run: which jq