Skip to content

ci!: install toolchains via setup-toolchain (mise) in shared workflows - #251

Merged
h13 merged 2 commits into
mainfrom
ci/consolidate-setup-toolchain
Dec 1, 2026
Merged

h13 merged 2 commits into
mainfrom
ci/consolidate-setup-toolchain

Conversation

@h13

@h13 h13 commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

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.

Workflow Before After
ci-node.yml inline mise + pnpm cache + install (duplicate of the action) setup-toolchain
publish-node.yml pnpm/action-setup + actions/setup-node mise-action directly, cache: false (see below)
ci-markdown.yml actions/setup-node (node 26 pinned in workflow) setup-toolchain
ci-terraform.yml hashicorp/setup-terraform (default latest) + setup-tflint setup-toolchain
ci-opentofu.yml opentofu/setup-opentofu (default latest) + setup-tflint setup-toolchain
ci-go.yml / ci-php.yml — unchanged, deliberately (README "Toolchain policy")

Also:

  • Adds .mise.toml to this repo (node, for the self-called ci-markdown) and includes it in ci.yml path filters
  • README: workflow table brought up to date (it listed npm steps and a node-version input that no longer existed; publish-node/ci-opentofu/ci-zizmor were missing) and a new Toolchain policy section documenting the mise-first rule and the Go/PHP exceptions
  • Workflows reference the action fully qualified (h13/.github/actions/setup-toolchain@<sha> # v1.2.0) because a reusable workflow resolves relative uses: against the caller's checkout; Renovate bumps the self-reference like any other pin
  • publish-node runs with elevated credentials (id-token/contents: write), so it deliberately does not use setup-toolchain: the release path stays cache-free (no pnpm store cache with its prefix-match restore-keys, mise-action with cache: false) to rule out release-path cache poisoning. It still resolves versions from .mise.toml

Breaking changes

  • ci-terraform.yml / ci-opentofu.yml: terraform-version / opentofu-version inputs removed; callers must declare terraform/opentofu and tflint in .mise.toml. This also removes the drift-prone latest default — versions are now pinned per repo and Renovate-managed
  • ci-node.yml / publish-node.yml / ci-markdown.yml: callers must declare node (and pnpm) in .mise.toml

Caller survey (all non-archived repos):

  • ci-node: salesforce-metadata-template, textlint-rule-rfc2606-domains, fyi — all already have .mise.toml with node+pnpm
  • publish-node: 8 repos (apps-script-*, servicenow-app-template, nps-platform) — all already have .mise.toml with node+pnpm
  • ci-terraform: smallbiz-suite — needs terraform + tflint in .mise.toml; prep PR opened so the Renovate pin bump lands safely
  • ci-opentofu / ci-markdown: no external callers (ci-markdown is only self-called)

Behavior changes to watch

  • publish-node install now runs with --ignore-scripts (same hardening as ci-node); builds still run explicitly via pnpm run build
  • publish-node no longer writes a registry .npmrc; publishing relies on OIDC trusted publishing (id-token: write), which is what effectively authenticated it before (no NODE_AUTH_TOKEN was ever provided). Verify the next real npm publish

Test plan

  • actionlint clean
  • markdownlint-cli2 clean (self CI glob)
  • Secret scan clean; all new uses: SHA-pinned with version comments
  • This PR's CI green: ci-markdown exercised setup-toolchain with the new .mise.toml, zizmor at min-severity: low, actionlint
  • After merge/release: confirm one consumer per workflow goes green on the pin bump (fyi for ci-node, one apps-script repo for publish-node, smallbiz-suite for ci-terraform)

h13 added 2 commits December 1, 2026 19:51
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.
@h13
h13 merged commit 30c4bb5 into main Dec 1, 2026
3 checks passed
@h13
h13 deleted the ci/consolidate-setup-toolchain branch December 1, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant