Repository navigation
fix: move nested actions off Node 20 - #156
Draft
Svilen-Stefanov wants to merge 2 commits into
Draft
Svilen-Stefanov wants to merge 2 commits into
Svilen-Stefanov wants to merge 2 commits into
Conversation
Repositories can require actions to be pinned to a full-length commit SHA. GitHub enforces that on the actions used by a composite action as well, so the tag references in `action.yml` made the action fail at startup, with a bare `startup_failure`, for every adopter with that policy enabled. Pin all five actions that `action.yml` uses to the commit their current moving tag or branch resolves to, with the exact release as a comment. This does not change which code runs. Add a test that rejects any non-local `uses:` in `action.yml` that is not pinned to a full SHA.
Four of the actions that action.yml uses still run on Node 20, which GitHub is retiring on its runners: checkout v4, setup-python v5, upload-artifact v4 and sticky-pull-request-comment v2. setup-java v5 already runs on Node 24. Bump each to the oldest major that runs on Node 24, keeping the change to the runtime move and nothing else: - actions/checkout v4.4.0 -> v5.1.0 - actions/setup-python v5.6.0 -> v6.3.0 - actions/upload-artifact v4.6.2 -> v6.0.0 (v5 still defaults to Node 20) - marocchino/sticky-pull-request-comment v2.9.4 -> v3.0.5 Every input and output the action uses exists in the new versions with the same defaults. Later majors were skipped on purpose: checkout v6 moves persisted credentials to a separate file, and checkout v7 refuses fork checkouts under pull_request_target and workflow_run. These versions need Actions Runner v2.327.1 or newer, which matters for adopters on self-hosted runners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
CodeBoarding reviewStatus: 0 changed components (no analysed file changed) See the full change in CodeBoarding. graph LR
n_Action_Workflow_Scripts["Action Workflow Scripts"]
classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
|
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.
Problem
Four of the actions that
action.ymluses still run on Node 20, which GitHub is retiring on its runners. Once that happens they fail for every adopter, and pinning them by SHA (#155) means nothing will move them for us.actions/checkoutactions/setup-pythonactions/upload-artifactmarocchino/sticky-pull-request-commentactions/setup-javaChange
Each one goes to the oldest major that runs on Node 24, so this PR changes the runtime and nothing else:
actions/checkoutfbc6f3992d24b796d5a048ff273f7fcc4a7b6c09(v5.1.0)actions/setup-pythonece7cb06caefa5fff74198d8649806c4678c61a1(v6.3.0)actions/upload-artifactb7c566a772e6b6bfb58ed0dc250532a479d7789f(v6.0.0)marocchino/sticky-pull-request-comment5770ad5eb8f42dd2c4f34da00c94c5381e49af88(v3.0.5)upload-artifactv5 because it still runs on Node 20 by default.checkoutv6 moves persisted credentials to a separate file, andcheckoutv7 refuses to check out fork PRs underpull_request_target/workflow_run. Both are behaviour changes we'd want to look at separately.README.mdanddocs/COMMIT_STRATEGY.mdsaidupload-artifact@v4. They now say v4 and later, which is still accurate after this change.Compatibility
action.ymluses (header,number,message,path;name,path,retention-days,if-no-files-found, outputartifact-url; thecheckoutinputs;python-version) exists in the new versions with the same defaults.Verification
git ls-remote, and I read each version'sruns.usingat that SHA.python -m unittest discover -s tests: 259 tests, 7 skipped, all OK. That includestest_action_pinning.pyfrom fix: pin nested actions by commit SHA #155.actionlintis clean.🤖 Generated with Claude Code