diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad2ac81..5f45171 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ on: - "sync/**" - ".markdownlint-cli2.yaml" - ".mise.toml" + - "mise.lock" pull_request: paths: - ".github/workflows/**" @@ -18,6 +19,7 @@ on: - "sync/**" - ".markdownlint-cli2.yaml" - ".mise.toml" + - "mise.lock" permissions: contents: read diff --git a/.github/workflows/compliance-audit.yml b/.github/workflows/compliance-audit.yml index 2a0311d..cbf40da 100644 --- a/.github/workflows/compliance-audit.yml +++ b/.github/workflows/compliance-audit.yml @@ -72,6 +72,18 @@ jobs: fi fi + # Repos on mise-based shared CI must declare their toolchain in .mise.toml + if ! echo "$TREE" | grep -qE "^\.?mise\.toml$"; then + while read -r wf; do + [ -n "$wf" ] || continue + WF_CONTENT=$(gh api "repos/h13/$repo/contents/$wf" --jq '.content' 2>/dev/null | base64 -d || true) + if grep -qE "h13/\.github/(\.github/workflows/(ci-node|publish-node|ci-markdown|ci-opentofu|ci-terraform)\.yml|actions/setup-toolchain)" <<< "$WF_CONTENT"; then + FINDINGS="${FINDINGS}\n - [ ] Missing \`.mise.toml\` (mise-based shared CI needs it)" + break + fi + done <<< "$(echo "$TREE" | grep -E "^\.github/workflows/.*\.ya?ml$" || true)" + fi + if [ -n "$FINDINGS" ]; then REPORT="${REPORT}\n### $repo\n$FINDINGS\n" ISSUES_FOUND=$((ISSUES_FOUND + 1)) diff --git a/.mise.toml b/.mise.toml index 0d4dad8..0fddf76 100644 --- a/.mise.toml +++ b/.mise.toml @@ -1,2 +1,5 @@ +[settings] +lockfile = true + [tools] node = "26.13.1" diff --git a/actions/setup-toolchain/action.yml b/actions/setup-toolchain/action.yml index 2fe9de1..d98c913 100644 --- a/actions/setup-toolchain/action.yml +++ b/actions/setup-toolchain/action.yml @@ -5,6 +5,12 @@ inputs: install: description: Run pnpm install --frozen-lockfile --ignore-scripts when pnpm-lock.yaml exists default: "true" + cache: + description: >- + Restore caches (mise installs, pnpm store). Set to "false" in privileged + jobs (release/publish paths) so they never consume a cache another run + could have seeded. + default: "true" runs: using: composite @@ -13,15 +19,16 @@ runs: with: # renovate: datasource=github-releases depName=jdx/mise version: "2026.11.16" + cache: ${{ inputs.cache }} - name: Resolve pnpm store path - if: hashFiles('pnpm-lock.yaml') != '' + if: inputs.cache == 'true' && hashFiles('pnpm-lock.yaml') != '' id: pnpm-store shell: bash run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - if: hashFiles('pnpm-lock.yaml') != '' + if: inputs.cache == 'true' && hashFiles('pnpm-lock.yaml') != '' with: path: ${{ steps.pnpm-store.outputs.path }} key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} diff --git a/mise.lock b/mise.lock new file mode 100644 index 0000000..69ae066 --- /dev/null +++ b/mise.lock @@ -0,0 +1,36 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + +lockfile_version = 5 + +[[tools.node]] +version = "26.13.1" +backend = "core:node" +specifiers = ["26.13.1"] + +[tools.node."platforms.linux-arm64"] +checksum = "sha256:80a330b35415382878df18d41afbd106ea89bfb3be0087d6608e289a14c5cc7d" +url = "https://nodejs.org/dist/v26.13.1/node-v26.13.1-linux-arm64.tar.gz" + +[tools.node."platforms.linux-arm64-musl"] +checksum = "sha256:42684e7f1830ef9eaadd040672cba41bbaff9549d834600699f92ee1ee5b1fb1" +url = "https://unofficial-builds.nodejs.org/download/release/v26.13.1/node-v26.13.1-linux-arm64-musl.tar.gz" + +[tools.node."platforms.linux-x64"] +checksum = "sha256:518674de2b621728a5e4486f5fb3b7d2900bb3cc4aa97969edaa463db99f9778" +url = "https://nodejs.org/dist/v26.13.1/node-v26.13.1-linux-x64.tar.gz" + +[tools.node."platforms.linux-x64-musl"] +checksum = "sha256:04bf9ed3e32ea139c9af52f6dd06879ff6f8880555a0aa1183ef2d156c0e02d3" +url = "https://unofficial-builds.nodejs.org/download/release/v26.13.1/node-v26.13.1-linux-x64-musl.tar.gz" + +[tools.node."platforms.macos-arm64"] +checksum = "sha256:aec2514ea1ceb2ba52455e9ec65986f6749a06dd759e5db2a72e6889668c9735" +url = "https://nodejs.org/dist/v26.13.1/node-v26.13.1-darwin-arm64.tar.gz" + +[tools.node."platforms.macos-x64"] +checksum = "sha256:82bb96078a24ca50b9c9a38f2379e6be6d87171fcd400fc14c8934b3bce96e2f" +url = "https://nodejs.org/dist/v26.13.1/node-v26.13.1-darwin-x64.tar.gz" + +[tools.node."platforms.windows-x64"] +checksum = "sha256:e2edda75bfb089654705cf65a13b58933bfd5f57148e8ebda916f58a2474f1f7" +url = "https://nodejs.org/dist/v26.13.1/node-v26.13.1-win-x64.zip"