From 4f2520e058812d403b4f4eb3b15249761ea82bf8 Mon Sep 17 00:00:00 2001 From: chtnnh <59027776+chtnnh@users.noreply.github.com> Date: Mon, 17 Aug 2026 09:36:59 +0400 Subject: [PATCH] ci: bump Actions off Node 20 runtime Keep the push walker from main; pin checkout/setup-node and Pages to v5. Closes #6. Know-Code-Verified: f795e06c6d117f30469b3cdfd5c85225d1613c3d1f0c02841f6d9dcd2686d4b5 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/docs.yml | 10 ++++++---- .github/workflows/know-code.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .github/workflows/umami-proxy.yml | 2 +- action/README.md | 2 +- action/action.yml | 2 +- packages/cli/src/commands-core.test.ts | 4 ++++ packages/cli/src/commands/init.ts | 2 +- website/docs/ci.md | 2 +- 10 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 421c2b0..7c3aa9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 with: node-version: "22" cache: npm diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a4662fb..e80ba46 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,9 +23,9 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: "22" cache: npm @@ -38,9 +38,11 @@ jobs: npm run build -w website - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v5 with: path: website/build + # v4+ excludes dotfiles by default; Docusaurus needs .nojekyll. + include-hidden-files: true deploy: needs: build @@ -50,4 +52,4 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/know-code.yml b/.github/workflows/know-code.yml index 8126c49..1d1028f 100644 --- a/.github/workflows/know-code.yml +++ b/.github/workflows/know-code.yml @@ -13,7 +13,7 @@ jobs: verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 # Default pull_request checkout is a merge commit (no trailers). @@ -21,7 +21,7 @@ jobs: # On push, head.sha is empty so this is github.sha (the new tip). ref: ${{ github.event.pull_request.head.sha || github.sha }} - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: "22" cache: npm diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4ad7b3..0406656 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,12 +20,12 @@ jobs: runs-on: ubuntu-latest environment: npm-release steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 # Node 24 → npm ≥ 11.5.1 (required for trusted publishing). # Do NOT set registry-url: setup-node would inject a dummy NODE_AUTH_TOKEN # that prevents the OIDC exchange (ENEEDAUTH). - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: "24" package-manager-cache: false diff --git a/.github/workflows/umami-proxy.yml b/.github/workflows/umami-proxy.yml index 2874e7c..83bbfbb 100644 --- a/.github/workflows/umami-proxy.yml +++ b/.github/workflows/umami-proxy.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Deploy Worker uses: cloudflare/wrangler-action@v4 diff --git a/action/README.md b/action/README.md index aa8e359..0bb584b 100644 --- a/action/README.md +++ b/action/README.md @@ -16,7 +16,7 @@ on: # ... -- uses: actions/checkout@v4 +- uses: actions/checkout@v5 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha || github.sha }} diff --git a/action/action.yml b/action/action.yml index ac16009..13e624b 100644 --- a/action/action.yml +++ b/action/action.yml @@ -38,7 +38,7 @@ runs: using: composite steps: - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: "22" diff --git a/packages/cli/src/commands-core.test.ts b/packages/cli/src/commands-core.test.ts index 5d112ff..6c191d7 100644 --- a/packages/cli/src/commands-core.test.ts +++ b/packages/cli/src/commands-core.test.ts @@ -256,6 +256,7 @@ describe("commands: config / init / quiz / doctor / reset / ship", () => { const yml = consumerWorkflowYaml("develop"); assert.match(yml, /base-branch: develop/); assert.match(yml, /chtnnh\/know-code\/action@v0\.3\.0/); + assert.match(yml, /actions\/checkout@v5/); assert.match(yml, /pull_request:/); assert.match(yml, /push:/); assert.match(yml, /branches:\n {6}- develop/); @@ -274,6 +275,8 @@ describe("commands: config / init / quiz / doctor / reset / ship", () => { join(repoRoot, ".github", "workflows", "know-code.yml"), "utf8", ); + assert.match(workflow, /actions\/checkout@v5/); + assert.match(workflow, /actions\/setup-node@v5/); assert.match(workflow, /push:/); assert.match(workflow, /branches: \[main\]/); assert.match(workflow, /verify --from/); @@ -283,6 +286,7 @@ describe("commands: config / init / quiz / doctor / reset / ship", () => { assert.match(workflow, /else\n know-code verify\n/); const action = readFileSync(join(repoRoot, "action", "action.yml"), "utf8"); + assert.match(action, /actions\/setup-node@v5/); assert.match(action, /^ {2}from:/m); assert.match(action, /zero before SHA/); assert.match(action, /--from \$FROM/); diff --git a/packages/cli/src/commands/init.ts b/packages/cli/src/commands/init.ts index 370c605..568f376 100644 --- a/packages/cli/src/commands/init.ts +++ b/packages/cli/src/commands/init.ts @@ -26,7 +26,7 @@ jobs: verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 ref: \${{ github.event.pull_request.head.sha || github.sha }} diff --git a/website/docs/ci.md b/website/docs/ci.md index 1aee4ab..f9ba605 100644 --- a/website/docs/ci.md +++ b/website/docs/ci.md @@ -26,7 +26,7 @@ jobs: verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha || github.sha }}