diff --git a/.github/actions/mise.setup-tools/action.yaml b/.github/actions/mise.setup-tools/action.yaml index aa876fc..0e60ffa 100644 --- a/.github/actions/mise.setup-tools/action.yaml +++ b/.github/actions/mise.setup-tools/action.yaml @@ -7,6 +7,10 @@ inputs: required: false default: v2026.10.8 description: "(Optional) The version of mise to install. Pinned by default because resolving `latest` can point to a version whose release assets are not published yet. Defaults to `v2026.10.8`." + mise_minimum_release_age: + required: false + default: 72h + description: "(Optional) Minimum release age when mise_version is empty. Defaults to `72h`; ignored for pinned versions. Set both mise_version and this input to empty strings to allow latest-only GitHub/CDN fallback." mise_checksum: required: false description: "(Optional) The SHA256 checksum used to verify the downloaded mise binary." @@ -68,7 +72,7 @@ inputs: description: "(Optional) The prefix used for the cache keys. Defaults to `mise-v1`." cache_key: required: false - description: "(Optional) The complete cache key override with template support. When set, it takes precedence over `cache_key_prefix`." + description: "(Optional) The complete cache key override with template support. When set, it takes precedence over `cache_key_prefix`. Include `{{cache_period}}` or `{{default}}` to retain the 14-day cache rotation." experimental: required: false @@ -85,7 +89,7 @@ inputs: fetch_from_github: required: false default: "true" - description: "(Optional) Whether to fetch the mise binary from GitHub instead of `mise.jdx.dev`. Defaults to `true`." + description: "(Optional) Prefer GitHub downloads (`true`, default) or mise.jdx.dev (`false`). Fallback between sources requires both mise_version and mise_minimum_release_age to be empty. Pinned or age-filtered versions always use GitHub." wings_enabled: required: false default: "false" @@ -103,8 +107,15 @@ runs: steps: - name: Setup Tools with mise id: setup-mise - uses: jdx/mise-action@v4 + uses: jdx/mise-action@v5.2.7 with: + minimum_release_age: ${{ inputs.mise_minimum_release_age }} + cache_max_age_days: "14" + cache_restore_retry_budget: 60s + cache_save_retry_budget: 120s + # Preserve v4 token and install-scope defaults. + persist_github_token: "true" + monorepo: "false" version: ${{ inputs.mise_version }} sha256: ${{ inputs.mise_checksum }} mise_dir: ${{ inputs.mise_dir }} @@ -126,5 +137,6 @@ runs: experimental: ${{ inputs.experimental }} log_level: ${{ inputs.log_level }} github_token: ${{ inputs.github_token }} + # Latest-only fallback is automatic when version and release age are both empty. fetch_from_github: ${{ inputs.fetch_from_github }} wings_enabled: ${{ inputs.wings_enabled }}