Repository navigation
ci!: install toolchains via setup-toolchain (mise) in shared workflows - #251
Merged
Merged
Conversation
Replace per-ecosystem setup actions with the setup-toolchain composite action in ci-node, publish-node, ci-markdown, ci-terraform and ci-opentofu. Tool versions now come from the calling repository's .mise.toml, the same source local dev uses, kept fresh by Renovate. ci-go (setup-go reads go.mod and ships module/build caching) and ci-php (setup-php installs prebuilt binaries and extensions) deliberately keep their dedicated actions; the policy is documented in the README. BREAKING CHANGE: ci-terraform.yml and ci-opentofu.yml no longer accept terraform-version/opentofu-version inputs; callers must declare terraform/opentofu and tflint in .mise.toml. Callers of ci-node, publish-node and ci-markdown must declare node (and pnpm) there too.
publish-node runs with id-token/contents write, so it must not restore caches another branch could have seeded (release-path cache poisoning). Use mise-action directly with cache disabled instead of setup-toolchain, whose pnpm store cache carries a prefix-match restore-keys fallback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates toolchain installation in the shared workflows onto mise. Tool versions now come from the calling repository's
.mise.toml— the same source local dev uses, kept fresh by Renovate.ci-node.ymlsetup-toolchainpublish-node.ymlpnpm/action-setup+actions/setup-nodemise-actiondirectly,cache: false(see below)ci-markdown.ymlactions/setup-node(node 26 pinned in workflow)setup-toolchainci-terraform.ymlhashicorp/setup-terraform(defaultlatest) +setup-tflintsetup-toolchainci-opentofu.ymlopentofu/setup-opentofu(defaultlatest) +setup-tflintsetup-toolchainci-go.yml/ci-php.ymlAlso:
.mise.tomlto this repo (node, for the self-calledci-markdown) and includes it inci.ymlpath filtersnode-versioninput that no longer existed;publish-node/ci-opentofu/ci-zizmorwere missing) and a new Toolchain policy section documenting the mise-first rule and the Go/PHP exceptionsh13/.github/actions/setup-toolchain@<sha> # v1.2.0) because a reusable workflow resolves relativeuses:against the caller's checkout; Renovate bumps the self-reference like any other pinpublish-noderuns with elevated credentials (id-token/contents: write), so it deliberately does not usesetup-toolchain: the release path stays cache-free (no pnpm store cache with its prefix-matchrestore-keys,mise-actionwithcache: false) to rule out release-path cache poisoning. It still resolves versions from.mise.tomlBreaking changes
ci-terraform.yml/ci-opentofu.yml:terraform-version/opentofu-versioninputs removed; callers must declareterraform/opentofuandtflintin.mise.toml. This also removes the drift-pronelatestdefault — versions are now pinned per repo and Renovate-managedci-node.yml/publish-node.yml/ci-markdown.yml: callers must declarenode(andpnpm) in.mise.tomlCaller survey (all non-archived repos):
ci-node: salesforce-metadata-template, textlint-rule-rfc2606-domains, fyi — all already have.mise.tomlwith node+pnpmpublish-node: 8 repos (apps-script-*, servicenow-app-template, nps-platform) — all already have.mise.tomlwith node+pnpmci-terraform: smallbiz-suite — needsterraform+tflintin.mise.toml; prep PR opened so the Renovate pin bump lands safelyci-opentofu/ci-markdown: no external callers (ci-markdown is only self-called)Behavior changes to watch
publish-nodeinstall now runs with--ignore-scripts(same hardening asci-node); builds still run explicitly viapnpm run buildpublish-nodeno longer writes a registry.npmrc; publishing relies on OIDC trusted publishing (id-token: write), which is what effectively authenticated it before (noNODE_AUTH_TOKENwas ever provided). Verify the next real npm publishTest plan
actionlintcleanmarkdownlint-cli2clean (self CI glob)uses:SHA-pinned with version commentsci-markdownexercisedsetup-toolchainwith the new.mise.toml, zizmor atmin-severity: low, actionlint