mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-15 06:10:32 +00:00
The cache key included only os and arch (`mise-v1-macos-arm64-<hash>`), so any repo running CI on multiple runner providers with the same os/arch — github-hosted, namespace.so, BuildJet, self-hosted M-series macs — would clobber each other's caches. The first run on a new provider would restore tool installs built for the previous provider's image, leading to "does not have an executable named X" errors or SIGILL crashes on cached binaries built against a different glibc. Append the GitHub Actions hosted-runner ImageOS env var (e.g. "macos15", "ubuntu24") to the cache key's platform segment. Other runners pool under "self-hosted"; users running multiple self-hosted profiles can scope further with cache_key_prefix. Implementation note: `getTarget()` is also used to construct the mise binary download URL (must match the release-asset filename, e.g. `mise-v2026.4.0-macos-arm64.tar.gz`). Adding the image suffix there would 404 the download. So `getTarget()` keeps its current shape and a new `getRunnerImageId()` helper composes the image discriminator into the cache-key platform segment only. This is a one-time cache miss for existing users; the cache rebuilds on the next run and stays scoped per-image after that. |
||
|---|---|---|
| .. | ||
| index.ts | ||