chore: bump actions/checkout to v7 - #5469
Merged
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
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.
Why
Every workflow run is annotated with the Node 20 deprecation notice, and
python.yaml/release.yamlare still onactions/checkout@v3, which declaresruns.using: node16. The runner is force-overriding both to Node 24, so those steps execute on a runtime they were never built or tested against — and the override is temporary. This moves every pin to the current major, which targets node24 natively.v3v4v5v6v7(latestv7.0.1)Going straight to
v7rather than the minimum hop, because only one intervening breaking change touches this repo (see below).Breaking-change review
ubuntu-latest,ubuntu-22.04,ubuntu-24.04,ubuntu-24.04-arm, or a hostedmatrix.os/matrix.runner). The exception isgpu_test_jobinpython.yaml, which isruns-on: gpu-t4. Self-hosted runners auto-update by default, so this should already be well past the floor — worth a glance at the runner's agent version before merge, since I can't read/actions/runnerswithout admin on the repo.$RUNNER_TEMPviaincludeIf.gitdirinstead of.git/config'shttp.extraheader. Authenticated git in later steps still works through the conditional include. Nothing in.github/reads.git/config, grepsextraheader, or setspersist-credentials; the one authenticated git command isgit push origininpr_auto_run_gen_docs.yaml, which keeps working. Nocontainer:jobs, so the higher 2.329.0 floor for container-action credential access does not apply.submodules: recursiveis used by 7 steps and is unchanged through v7.pull_request_target/workflow_run. This one does hit us; details below.fetch-depth: 0,submodules: recursive,ref:,repository:, andpath:. All unchanged through v7.The one behavioral decision:
pr_auto_run_gen_docs.yamlThat workflow triggers on
pull_request_targetand has two checkouts. ReadingassertSafePrCheckout, the guardrail throws only when the head repo id differs from the base repo id and the resolved input points at the fork head:repository: github.repository,ref: base.sha. Neither the repository nor the ref/commit matches the PR head, so the helper returns early. Unaffected, fork PR or not.repository: head.repo.full_name. For a same-repo PR the head repo id equals the base repo id and the check returns early. For a fork PR it throws, which would break the job.Fork PRs currently do reach that step: the job's
ifgates onstartsWith(head.ref, 'chore/models-sync/'), which a fork branch can satisfy, and there is an explicit "Skip fork PR push" step downstream. So I setallow-unsafe-pr-checkout: trueon that step only, with a comment, to preserve today's behavior.I think that's defensible rather than reflexive: the workflow was already written against the pwn-request risk the guardrail targets. It never installs or executes fork code — it copies only the six whitelisted model spec JSON files out of
pr/(refusing symlinks) into a workspace cloned from the trustedbasecheckout, installs./base[doc], runsbase'sgen_docs.py, validates every generated path against a strict regex, and pushes only whenhead.repo.full_name == github.repository.Note that pinning back to
v6is not an escape hatch: the guardrail was backported, so the floatingv5,v6,v6.1.0, andv5.1.0tags all carry it. Onlyv6.0.3and older avoid it.If you'd rather honor the guardrail than opt out of it, the alternative is to stop checking out fork heads at all — gate the job on
head.repo.full_name == github.repository, or fetch the six JSON files through the API instead of via checkout. Both change behavior for fork PRs, so I kept them out of a version bump. Happy to do either as a follow-up.What changed
The version string on all 14 occurrences across 5 workflow files, plus the one
allow-unsafe-pr-checkoutinput and its comment. No step names, other inputs, or surrounding logic touched.Verification
actionlintreports zero findings on anyactions/checkoutline and accepts the new input. The findings it does report are all pre-existing and untouched by this PR:actions/setup-python@v4andactions/setup-node@v1inpython.yamlare flagged as hard errors ("the runner of this action is too old to run on GitHub Actions" — both are node16), plus assortedSC2086shellcheck infos.grep -rn "actions/checkout"finds no hits outside.github/workflows/, and no test or lint file in the repo asserts action versions, so there is nothing to update alongside.python.yamlruns onpull_request, so its four bumped checkouts exerciselint,changes, andbuild_test_jobhere, and the Node deprecation annotation should be gone from those runs.docker-cd.yamlandbuild-pypiserver-image.yamldon't run on PRs but both supportworkflow_dispatchif you want to smoke-test them from this branch.release.yamlis tag-only.pr_auto_run_gen_docs.yamlneeds achore/models-sync/*PR to exercise — the same-repo path is the one that matters and is unaffected by the v7 check either way.Not in scope
actions/checkoutonly, to keep the diff one line per site. Several other actions carry the same deprecation; the two node16 ones are the urgent follow-up. Current majors verified against the GitHub API:actions/setup-pythonv4(x3),v5v7v4uses are node16 and actionlint already errors on them — most urgent of the batchactions/setup-nodev1v7actions/cachev4v6actions/github-script60a0d83, v7)v9require('@actions/github')docker/build-push-actionv7docker/setup-buildx-actionv4pypa/gh-action-pypi-publishv1.5.0v1.xAlready fine:
docker/login-action@v4,actions/stale@v9, and the local composite./.github/actions/check-release-permission.