Skip to content

templates: move actions/checkout onto its Node 24 major - #168

Merged
mmcky merged 1 commit into
mainfrom
maint/node24-templates
Sep 18, 2026
Merged

mmcky merged 1 commit into
mainfrom
maint/node24-templates

Conversation

@mmcky

@mmcky mmcky commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

The three workflow templates check out with actions/checkout@v4, whose action.yml declares runs.using: node20. So every lecture repository scaffolded from them starts on Node 20. This moves them to @v7, which runs on node24 and is what this repo's own workflows and the consumer repositories in PLAN.md's table already use. Part of QuantEcon/workspace-lectures#68.

What changes

File Change
templates/ci.yml actions/checkout@v4 → @v7 (line 47). No with:, as before.
templates/cache.yml @v4 → @v7 (line 57). fetch-depth: 0 kept.
templates/publish.yml @v4 → @v7 (line 54). fetch-depth: 0 kept.
CHANGELOG.md Unreleased / Changed, in the style of the other entries there

With the checkout ref normalised, each parsed template is identical to main: no other key, step or input moved.

Every pin in templates/, re-resolved

Each runs.using below was read from the action's action.yml at the exact ref, not taken from release notes.

Pin Resolves to runs.using
actions/checkout@v4 (before) 11d5960a node20
actions/checkout@v7 (after) v7.0.1, 3d3c42e5 node24
quantecon/actions/{setup-environment, restore-jupyter-cache, build-lectures, build-jupyter-cache, preview-netlify, preview-cloudflare, publish-gh-pages}@v0 v0.11.1, a3886399 composite, all seven

The composites have no runtime of their own, so I also resolved what they call at v0. actions/cache@v6 (and its restore and save), configure-pages@v6, deploy-pages@v5, github-script@v9, upload-artifact@v7, softprops/action-gh-release@3d0d9888 and conda-incubator/setup-miniconda@8ee1f361 are all node24. upload-pages-artifact@v5 is a composite over upload-artifact@bbbca2dd, which is node24. So after this PR a newly scaffolded repository has no Node 20 action anywhere in its action graph.

Why @v7 is safe in these templates

  • v5 moved to node24 and needs runner v2.327.1 or later. The runs below report runner 2.337.0.
  • v6 stores persisted credentials in a separate file under $RUNNER_TEMP. Its caveat covers Docker container actions. The templates run a container job, and everything they call is composite or JavaScript.
  • v7 refuses to check out fork PR code under pull_request_target and workflow_run. The templates trigger on pull_request (ci), on schedule, workflow_dispatch and push (cache), and on push and workflow_dispatch (publish), so none of them is affected.
  • Inputs: v7's action.yml still has fetch-depth (default 1; 0 means all history).
  • It already runs in these images. The table below shows each run.
Run Image Checkout Result
QuantEcon/actions Test Container 35316939323, job Smoke: quantecon (2026-09-18) ghcr.io/quantecon/quantecon:latest, the image the templates name actions/checkout@v7 (SHA:3d3c42e5…) success
test-actions-lecture-intro cache.yml 35319421281 (2026-09-18) quantecon-build:latest @v7, fetch-depth: 0 success
test-actions-lecture-intro ci.yml 35319416674 (2026-09-18) quantecon-build:latest @v7, default depth success

The consumers in PLAN.md's table are already on @v7 on their default branches: lecture-dp, lecture-python.myst, lecture-jax, lecture-python-intro, lecture-python-advanced.myst, lecture-python-programming, continuous_time_mcs, and the canary (whose linkcheck.yml is on @v5, also node24). Consumers outside that table are not all there: QuantEcon/iuj_feb_2026 calls preview-netlify@main but checks out with @v4 (node20), and QuantEcon/lecture-python-programming.fr is on @v6 (node24). Neither is changed by this PR, which touches only the templates.

What CI can and cannot show

  • CI does not execute the templates. test-actions.yml's relevance gate lists ^templates/ and CHANGELOG.md in IGNORED, so its harness jobs skip on this PR. No workflow here lints templates/.
  • Checked locally. All three parse with PyYAML 6.0.3, and actionlint 1.7.12 is clean on both main and this branch. actionlint's bundled data does not cover checkout@v7's inputs: a deliberately misspelt fetch-depthh went unflagged. So the with: keys were checked against v7's action.yml instead.
  • It reaches consumers only through new scaffolds. The templates are copied into a repository, not referenced, so no existing consumer changes and no v0 tag move is needed or wanted.

How this relates to #109

#109's checklist has "checkout@v4 → @v7 across templates/ and docs". This PR covers the templates/ half, 3 of the 34 pre-v7 sites on main. Left for that issue:

#147 and #160 propose edits to the same files (ci.yml's concurrency group and paths filter; cache-type) but not the checkout step, so they do not overlap.

Reported, not changed: ci.yml checks out shallow

main already has fetch-depth: 0 on cache.yml and publish.yml (#165). ci.yml checks out at the default depth of 1, so a PR preview built from it dates every page's "Last changed" header to the checked-out commit, which on pull_request is GitHub's merge commit. That looks deliberate. #164 chose to warn about shallow clones rather than force full ones, and #148 and #149 plan fetch-depth: 1 for previews to save time, landing together with #147's bounded SHA fetches. The build-lectures shallow-clone warning from #165 is on main but not yet in v0 (still v0.11.1). So today a preview from this template gets the checkout-commit dates with no warning, until the next release.

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings September 18, 2026 12:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is a straightforward, consistent version bump in templates plus a matching changelog entry, with no functional workflow logic changes beyond the action ref update.

Pull request overview

Updates the workflow templates shipped in templates/ to use actions/checkout@v7 (Node 24) instead of @v4 (Node 20), ensuring newly scaffolded lecture repositories don’t reintroduce Node 20 into their action graph; also records the change in the Unreleased changelog.

Changes:

  • Bump actions/checkout from @v4 to @v7 in all three workflow templates (ci.yml, cache.yml, publish.yml).
  • Preserve existing checkout configuration, including fetch-depth: 0 where already present.
  • Add an Unreleased changelog entry documenting the template pin update and its impact scope (new scaffolds only).
File summaries
File Description
templates/ci.yml Switch template checkout step to actions/checkout@v7.
templates/cache.yml Switch template checkout step to actions/checkout@v7 while keeping fetch-depth: 0.
templates/publish.yml Switch template checkout step to actions/checkout@v7 while keeping fetch-depth: 0.
CHANGELOG.md Document the template checkout major bump under Unreleased / Changed.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The three workflow templates still checked out with actions/checkout@v4,
whose action.yml declares `runs.using: node20`, so every lecture repository
scaffolded from them started on Node 20. They now use @v7 (v7.0.1, 3d3c42e5,
`runs.using: node24`), the major this repo's own workflows and the
consumer repositories in PLAN.md's table already use. This repo's Test
Container smoke job already runs @v7 inside ghcr.io/quantecon/quantecon,
the image the templates name.

The fetch-depth: 0 on the cache.yml and publish.yml checkouts is kept; v7
still accepts the input. ci.yml keeps the default depth.

Templates reach a repository only when it is scaffolded from them, so no
existing consumer changes and the v0 tag does not need to move.

Part of QuantEcon/workspace-lectures#68. Covers the templates/ half of the
checkout item in #109; the READMEs and docs are left for that issue.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@mmcky
mmcky force-pushed the maint/node24-templates branch from 05ce73b to 27e9751 Compare September 18, 2026 12:31
@mmcky
mmcky merged commit 44c0273 into main Sep 18, 2026
17 checks passed
@mmcky
mmcky deleted the maint/node24-templates branch September 18, 2026 12:34
mmcky added a commit that referenced this pull request Sep 23, 2026
…with the shipped code (#106, #109, #99) (#175)

* docs: sweep to the 2026.06 baseline and measured image sizes (#106)

Both images ship anaconda=2026.06 (containers/quantecon/environment.yml:11;
the lean image carries the matching pin set), but seven sites still said
2025.12. They now say 2026.06.

Image sizes were a mix of round "~8GB / ~3GB" figures, a "~60% smaller"
claim, and an older measured pair. Every size site now carries the pair the
fixed size job (#172) produced on 2026-09-23, run 35856865426 (Docker 28.0.4,
overlay2, ubuntu-latest), and says which metric it is:

- quantecon (full): 3.33 GB compressed (what a cold pull downloads),
  8.60 GB on disk
- quantecon-build (lean): 2.93 GB compressed, 7.33 GB on disk

The lean image is about 12% smaller to pull and 15% smaller on disk, so the
"faster CI pulls" / "fast image pulls" wording becomes "a modestly smaller
pull", and the lean README's unmeasured pull-time and package-count rows go.

"Minimal TexLive" was false. The two Dockerfiles' apt lists differ in exactly
two packages: the lean image drops texlive-luatex and adds graphviz;
texlive-latex-extra and texlive-fonts-extra are in both. The docs now say so,
and name what actually distinguishes the lean image: no anaconda
metapackage, an explicit package list pinned to the 2026.06 baseline. The
full image's "Complete TexLive installation" is corrected to match.

CHANGELOG history and PLAN.md:68's narration of the old date-pin keep their
2025.12 mentions on purpose.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs: reconcile READMEs, guides and templates with the shipped code (#109, #99)

The docs half of #109, with #99 folded in. The code items (the
build-jupyter-cache latex-requirements-file passthrough, the cname warning
and the template pin-drift check) ride with #107's PR.

Examples that failed for adopters:
- permissions: the preview-netlify and preview-cloudflare "Complete Workflow
  Example" blocks declared none, and the root README and QUICK-REFERENCE
  container quick starts declared contents/packages only. Both preview
  actions list, create and update PR comments through
  github.rest.issues.* with github.token, so each block now grants
  contents: read and pull-requests: write.
- actions/checkout: the remaining 29 @v4 and 2 @v5 references across 13
  docs move to @v7, matching the templates (#168) and this repo's
  workflows. with: fetch-depth lines are kept.

Documented behaviour that does not exist:
- QUICK-REFERENCE: the "Preview with Custom URL" recipe passed an alias
  input preview-netlify does not accept (the alias is fixed at pr-N); it
  becomes a short "Preview URL" note. The setup-environment key row now
  carries the environment-name and python-version segments and the cached
  path. The sample log block's "LaTeX cache hit" line (no LaTeX caching
  exists) and its other invented lines are replaced by strings the actions
  actually print. The "Pages 404?" snippet recommended contents: write,
  which as a permissions block would also drop pages and id-token; it now
  lists pages: write and id-token: write, with contents: write only for
  create-release-assets (#99).
- MIGRATION-GUIDE: the collab.yml snippet passed build-html and
  cache-workflow, which build-lectures never accepted; it now restores the
  cache with restore-jupyter-cache and builds with builder/source-dir. The
  copied commit message no longer claims LaTeX caching, and the
  build-jupyter-cache key carries its update-hash segment here and in
  ARCHITECTURE (#99).
- build-lectures README: "use setup-latex" pointed at a removed action; the
  inputs table gains the missing failure-artifact-name row.
- README and ARCHITECTURE said restore-jupyter-cache "never saves"; it is
  read-only by default with an optional PR-scoped save-cache.
- setup-environment README: the cache key and path now match action.yml.

Templates and the custom domain:
- The Actions Pages deploy ignores a CNAME file, so the cname input has no
  effect. templates/publish.yml, templates/README.md, MIGRATION-GUIDE and
  QUICK-REFERENCE now point at Settings -> Pages instead of offering cname.
- templates/publish.yml's release-asset block now says it needs a tag
  trigger (the file runs on pushes to main and manual dispatch) and
  contents: write (the job grants contents: read).
- New templates/latex-requirements.txt: the TeX packages the two images
  share, in the whole-line-comment format setup-environment parses. The
  cache.yml standard-runner comment and templates/README point at it, since
  a standard-runner pdflatex build fails without the file.
- cache.yml and templates/README describe the _build artifact as
  failure-only, which it has been since v0.8.0.

Smaller items: the lean image README's last @main example moves to @v0;
the full image README's theme version reads 0.21.0, the environment.yml
pin. README's Contributing section now points at CONTRIBUTING.md, which
tests by branch and moves v0; CONTRIBUTING gains the staged-release
procedure decided on #110 (decision 4), its known limits and the rollback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs: bring PLAN.md, CONTRIBUTING and the CHANGELOG up to date (#106, #109)

PLAN.md:
- The consumers table said five lecture repos were pinned to v0.8.0 or
  v0.9.0. Dependabot bumped all six exact call sites to v0.11.1 between
  2026-08-12 and 2026-08-24 (#110's 2026-09-23 revalidation; the pins are
  confirmed by code search). The rows, the "Corrected" note and the
  lecture-jax rollout row now say so; the section keeps its structure.
- The August triage table already had rows for the issues #106 lists,
  except #135. Each row is refreshed to its state on 2026-09-23 (all are
  open; the open PRs #144, #170, #171 and #172 and the in-progress #105 and
  #107 work are named), and #135 gets a row. No rows are duplicated.
- Item 10's "propagate corrected container-size figures" half is marked
  done by this sweep; the trim itself stays open as its own PR (decision 1
  on #110).
- The "Last updated" line records this pass.

CONTRIBUTING.md: the doc-update matrix gains a PLAN.md row, so a backlog
item or consumer ref that moves updates the plan rather than waiting for
the next audit.

CHANGELOG.md: one [Unreleased] Documentation entry for the sweep.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs: address review of the #106/#109 docs sweep

- templates/latex-requirements.txt: describe the file format so it holds
  under both the current parse (grep -v '^#') and #173's, where '#' starts
  a comment anywhere. Drop the claim that an inline '#' reaches apt-get.
- templates/publish.yml: the release-asset note lists a third change, the
  tag pattern under the github-pages environment's deployment branches
  and tags, which otherwise reject a tag-triggered run.
- CONTRIBUTING.md: the staged-release limits say that steps 2-3 run
  neither publish-gh-pages (the canary's publish.yml fires only on a
  publish* tag) nor setup-environment at the candidate ref, replacing the
  narrower release-asset bullet.
- PLAN.md: #172 is marked open with the run the sizes come from; #144
  needs a rebase before review.
- CHANGELOG.md: the 2026.06 baseline is the full image's metapackage and
  the lean image's pin set, not something both images ship.
- containers/README.md: the lean image carries the pinned science stack,
  so "Jupyter Book build tools only" loses "only".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs: address the second review round of the #106/#109 sweep

- Four more job examples call preview-netlify without a permissions
  block (MIGRATION-GUIDE's preview job, QUICK-REFERENCE's standard CI
  workflow, both ARCHITECTURE workflows). Each now grants contents: read
  and pull-requests: write (plus packages: read where it pulls the
  image), so the CHANGELOG line saying preview examples grant
  pull-requests: write is true of every one.
- README's publish-gh-pages feature line no longer lists custom-domain
  support first; custom domains are set in Settings -> Pages.
- MIGRATION-GUIDE's sample commit message says "conda environment
  caching": there is no separate pip cache.
- PLAN.md's #105 and #107 rows cite the now-open #174 (draft) and #173.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs(templates): list make in the example latex-requirements.txt

Copilot review on #175. The header says the file lists the TeX packages
and build tools both images install, but omitted make, which both
Dockerfiles install under "Build tools". It is needed, not incidental:
jupyter-book 1.0.4.post1's pdflatex builder runs `make all-pdf` in the
LaTeX output directory (jupyter_book/cli/main.py). Hosted Ubuntu runners
ship make already, so on them this is a no-op install; on a minimal
runner it is the difference between a PDF and a failed build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs(plan): #170 has merged

Refresh the #105 disposition row now that the README warning is on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs(containers): theme version is now 0.22.0

#162 moved both images to quantecon-book-theme 0.22.0 (full pins ==0.22.0,
lean >=0.22.0) after this sweep set the full image's README to 0.21.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs: add the .fr consumer row and refresh the current-release lines (#106, #109)

lecture-python-programming.fr exact-pins preview-netlify and publish-gh-pages
(with create-release-assets) at v0.11.1, moved there from v0.8.0 by Dependabot
on 2026-09-23, so it joins the consumers table and the exact-pin count becomes
eight call sites across six repos.

README.md and copilot-instructions.md said the current release was v0.8.0; it
is v0.11.1.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(plan): carry the .fr row into the consumer counts

d1b8fb1 added lecture-python-programming.fr (two exact @v0.11.1 call
sites, including publish-gh-pages). Two counts elsewhere in PLAN.md still
predated it: the Last-updated line said all six exact pins, and the
lecture-progress note had publish-gh-pages at 7/7 with five exact. They
now read eight pins across six repos, and 8/8 with six exact.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

* docs: lean image is 7.32 GB on disk after the #162 rebuild

The first size report on main (run 35930060129, after #162 rebuilt both
images with quantecon-book-theme 0.22.0) reads full 3.33 GB compressed /
8.60 GB on disk, unchanged, and lean 2.93 GB / 7.32 GB: the lean on-disk
figure dropped by about 5 MB, enough to move the second decimal. The
eleven sites that quoted 7.33 now say 7.32, and PLAN.md's #106 row cites
that main run instead of the earlier branch dispatch. The ~15% (on disk)
and ~12% (compressed) gaps still hold.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Matt McKay <[email protected]>
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.

2 participants