Skip to content

v5.3.0: New mise_env input exports MISE_ENV to later steps

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 17:01
· 2 commits to main since this release
Immutable release. Only release title and notes can be modified.
924e7c5

A new mise_env input sets the mise environment for the action and exports MISE_ENV to every later step in the job. mise run and mise x in later steps now load the same mise.<env>.toml configs that the action installed and cached.

Added

  • mise_env input. Before this change, setting MISE_ENV in the action step's env: only applied inside the action. Later steps never saw it and quietly fell back to the base config. Job-level env: worked, but composite actions that pick the environment from their own inputs had to write MISE_ENV to GITHUB_ENV themselves, and security linters such as zizmor flag that. The new input handles the export for you:

    - uses: jdx/mise-action@v5
      with:
        mise_env: ci # loads mise.ci.toml on top of mise.toml
    - run: mise run test # also runs with MISE_ENV=ci

    In a composite action:

    runs:
      using: composite
      steps:
        - uses: jdx/mise-action@v5
          with:
            mise_env: ${{ inputs.haskell == 'true' && 'ci' || 'ci-no-haskell' }}

    The input accepts one or more environments, such as ci or ci,linux. The action exports it before computing the cache key, so {{mise_env}} in a custom cache_key, mise install, and later steps all use the same value. If MISE_ENV is already set, the input takes priority, the same way mise_dir takes priority over MISE_DATA_DIR. If you leave the input unset, nothing changes, and a step-level MISE_ENV still isn't exported. (#745 by @jdx with @veimox and @cprecioso, closes #447)

Full Changelog: v5.2.10...v5.3.0