mirror of
https://github.com/jdx/mise-action.git
synced 2026-06-20 05:06:31 +00:00
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [jdx/mise-action](https://redirect.github.com/jdx/mise-action) | action | minor | `v4.0.1` → `v4.1.0` | --- ### Release Notes <details> <summary>jdx/mise-action (jdx/mise-action)</summary> ### [`v4.1.0`](https://redirect.github.com/jdx/mise-action/releases/tag/v4.1.0): : automatic --locked installs [Compare Source](https://redirect.github.com/jdx/mise-action/compare/v4.0.1...v4.1.0) This release adds automatic locked installs when a `mise.lock` is present, and fixes a long-standing cache-key collision that could poison tool installs when workflows migrate between runner providers. #### Added ##### Automatic `--locked` install when `mise.lock` exists ([#​495](https://redirect.github.com/jdx/mise-action/pull/495)) by [@​zeitlinger](https://redirect.github.com/zeitlinger) When a repo contains `mise.lock`, the action now automatically passes `--locked` to `mise install` (on mise versions that support it). This removes the need to manually set `install_args: --locked` and prevents `mise install` from silently mutating the lockfile in CI. Explicit `install_args` and older mise versions are still respected. Note: workflows with a stale lockfile may now fail earlier and more explicitly instead of silently updating `mise.lock` mid-run — this surfaces lockfile drift rather than hiding it. #### Fixed - **Cache key collisions across runner providers** ([#​456](https://redirect.github.com/jdx/mise-action/pull/456)) — the default cache key now includes the runner image (e.g. `macos15`, `ubuntu24` for GitHub-hosted runners; `self-hosted` otherwise). Previously, repos migrating between providers like github-hosted, namespace.so, BuildJet, and self-hosted runners with the same OS/arch could restore a peer provider's `~/.local/share/mise/installs/*`, causing failures like `does not have an executable named '…'` or SIGILL crashes from binaries built against a different glibc/CPU featureset. Expect a one-time cache miss after upgrading; thereafter the cache stays scoped per image. - **`mise-shim.exe` missing on Windows** ([#​476](https://redirect.github.com/jdx/mise-action/pull/476)) by [@​risu729](https://redirect.github.com/risu729) — the action now installs `mise-shim.exe` alongside `mise.exe` and repairs restored caches that lack the shim. Fixes [#​475](https://redirect.github.com/jdx/mise-action/issues/475). #### Changed - Migrated the bundled action build from ncc (CommonJS) to Rollup (ESM) ([#​436](https://redirect.github.com/jdx/mise-action/pull/436)). No user-facing behavior change. **Full Changelog**: <https://github.com/jdx/mise-action/compare/v4.0.1...v4.1.0> </details> --- ### Configuration 📅 **Schedule**: (in timezone America/Chicago) - Branch creation - Only on Friday (`* * * * 5`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/jdx/mise-action). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIxOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
191 lines
5.7 KiB
YAML
191 lines
5.7 KiB
YAML
name: "build-test"
|
|
on: # rebuild any PRs and main branch changes
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref_name }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build: # make sure build/ci work properly
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
- uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0
|
|
- run: aube install
|
|
- run: aubr all
|
|
test: # make sure the action works on a clean machine without building
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: ubuntu
|
|
runs-on: ubuntu-latest
|
|
- name: macos
|
|
runs-on: macos-latest
|
|
- name: windows
|
|
runs-on: windows-latest
|
|
- name: alpine
|
|
runs-on: ubuntu-latest
|
|
container: alpine:3.22@sha256:310c62b5e7ca5b08167e4384c68db0fd2905dd9c7493756d356e893909057601
|
|
requirements: apk add --no-cache curl bash
|
|
name: ${{ matrix.name }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
container: ${{ matrix.container }}
|
|
steps:
|
|
- name: Install requirements
|
|
if: ${{ matrix.requirements }}
|
|
run: ${{ matrix.requirements }}
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup mise
|
|
uses: ./
|
|
with:
|
|
mise_toml: |
|
|
[tools]
|
|
jq = "1.7.1"
|
|
|
|
[env]
|
|
MY_ENV_VAR = "abc"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- run: mise --version
|
|
- run: mise x jq -- jq --version
|
|
- run: which jq
|
|
- run: jq --version
|
|
- name: Check Windows shim binary
|
|
if: runner.os == 'Windows'
|
|
shell: pwsh
|
|
run: |
|
|
$miseBinDir = Split-Path -Parent (Get-Command mise).Source
|
|
$miseShim = Join-Path $miseBinDir "mise-shim.exe"
|
|
if (!(Test-Path -LiteralPath $miseShim)) {
|
|
throw "mise-shim.exe was not installed next to mise.exe"
|
|
}
|
|
- run: . scripts/test.sh
|
|
shell: bash
|
|
|
|
specific_version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup mise
|
|
uses: ./
|
|
with:
|
|
cache_save: ${{ github.ref_name == 'main' }}
|
|
cache_key_prefix: mise-v1
|
|
version: 2025.7.3
|
|
sha256: d38d4993c5379a680b50661f86287731dc1d1264777880a79b786403af337948
|
|
install_args: bun
|
|
mise_toml: |
|
|
[tools]
|
|
bun = "1"
|
|
- run: which bun
|
|
- run: bun -v
|
|
- name: Update mise
|
|
uses: ./
|
|
with:
|
|
cache_save: ${{ github.ref_name == 'main' }}
|
|
cache_key_prefix: mise-v1
|
|
version: v2025.7.3 # should trim the `v`
|
|
sha256: d38d4993c5379a680b50661f86287731dc1d1264777880a79b786403af337948
|
|
|
|
checksum_failure:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup mise
|
|
id: bad
|
|
uses: ./
|
|
with:
|
|
version: 2024.9.6
|
|
sha256: 1f0b8c3d2e4f5a6b7c8d9e0f1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t
|
|
continue-on-error: true
|
|
- name: Dump steps context
|
|
if: ${{ always() }}
|
|
env:
|
|
STEPS_CONTEXT: ${{ toJson(steps) }}
|
|
run: echo "$STEPS_CONTEXT"
|
|
- name: expect failure
|
|
run: echo "Failed as expected"
|
|
if: ${{ steps.bad.outcome == 'failure' }}
|
|
- name: not failed as expected
|
|
run: |
|
|
echo "Expected failure but the job was ${STEPS_BAD_OUTCOME}"
|
|
exit 1
|
|
if: ${{ steps.bad.outcome != 'failure' }}
|
|
env:
|
|
STEPS_BAD_OUTCOME: ${{ steps.bad.outcome }}
|
|
|
|
custom_cache_key:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup mise with custom cache key
|
|
uses: ./
|
|
with:
|
|
cache_key: "custom-{{platform}}-{{install_args_hash}}-${{ github.run_id }}"
|
|
install_args: "jq@1.7.1"
|
|
mise_toml: |
|
|
[tools]
|
|
jq = "1.7.1"
|
|
- run: mise --version
|
|
- run: mise x jq -- jq --version
|
|
- run: which jq
|
|
- run: jq --version
|
|
|
|
fetch_from_github:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup mise from mise.jdx.dev
|
|
uses: ./
|
|
with:
|
|
fetch_from_github: true
|
|
cache: false
|
|
cache_save: false
|
|
mise_toml: |
|
|
[tools]
|
|
jq = "1.7.1"
|
|
- run: mise --version
|
|
- run: mise x jq -- jq --version
|
|
- run: which jq
|
|
- run: jq --version
|
|
|
|
final:
|
|
needs:
|
|
- build
|
|
- test
|
|
- specific_version
|
|
- checksum_failure
|
|
- custom_cache_key
|
|
- fetch_from_github
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 1
|
|
# Run on success or upstream failure but skip when the workflow is cancelled
|
|
# — `always()` would override `cancel-in-progress` and waste a runner.
|
|
if: ${{ !cancelled() }}
|
|
steps:
|
|
- name: Check CI job results
|
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
|
|
run: exit 1
|