[CHORE](ci) Move setup-codeartifact off Node 20 runtimes#27
Conversation
Bump aws-actions/configure-aws-credentials v4.3.1 -> v6.2.0 (Node 20 -> Node 24) and replace the archived Node 20 whelk-io/maven-settings-xml-action with an inline bash settings.xml writer. Removes a third-party + archived dependency and clears the forced 2026-06-16 Node 20 runtime cutover. The generated settings.xml is equivalent in the fields Maven uses (server id/username/password + single repository), so it stays interface-compatible for consumers. Updates the self-reference ignore justification in publish-maven-to-codeartifact and refreshes the README. Part of OvertureMaps/ops-team#384 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Overture PRojection ReviewThis PR updates the ✅ Checks Passed
🚩 Flags
❓ Open Questions
No security issues, hardcoded secrets, or AWS credential exposures are present. The PR follows org conventions (no Summary: The PR is well-justified and improves maintainability by removing archived dependencies and updating runtimes. However, the lack of automated tests for the new inline settings writer is a process gap—consider addressing this in a follow-up. Otherwise, changes are interface-compatible and safe for merge after consumer validation. |
There was a problem hiding this comment.
Pull request overview
Updates the repo’s reusable CodeArtifact composite actions to avoid the GitHub Actions Node.js 20 runtime cutoff by removing a Node-20-only dependency and bumping the AWS credentials action to a Node 24-capable release.
Changes:
- Bumped
aws-actions/configure-aws-credentialspin insetup-codeartifactfrom v4.3.1 to v6.2.0. - Replaced the archived
whelk-io/maven-settings-xml-actionwith an inline bash heredoc that writes~/.m2/settings.xml. - Updated the
publish-maven-to-codeartifactself-referencezizmorignore justification comment and refreshedsetup-codeartifactdocumentation to reflect the new runtime and settings writer.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/actions/setup-codeartifact/README.md | Documents the inline settings.xml writer and the Node.js 24 runtime dependency. |
| .github/actions/setup-codeartifact/action.yml | Updates AWS credentials action pin and replaces third-party settings writer with an inline bash heredoc. |
| .github/actions/publish-maven-to-codeartifact/action.yml | Adjusts the zizmor ignore comment for the same-repo self-reference to setup-codeartifact@main. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodeArtifact needs both a server (creds) and a repository (resolve URL) in settings.xml, and the token must stay out of the environment. actions/setup-java emits only env-placeholder servers, so it is a partial fit; record the rationale in-step for reviewers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
What
Hardens the
setup-codeartifactcomposite action (added in #25) to clear the GitHub-forced Node.js 20 runtime cutover on 2026-06-16:aws-actions/configure-aws-credentialsv4.3.1→v6.2.0(Node 20 → Node 24). Onlyrole-to-assumeandaws-regioninputs are used and both are stable across v4→v6, so nowith:changes.whelk-io/maven-settings-xml-actionwith an inline bashsettings.xmlwriter (acat <<EOFheredoc). The upstream action is archived with no Node 24 release, so there is no SHA to bump to — removing it drops a third-party and archived dependency entirely.Interface compatibility
The generated
~/.m2/settings.xmlis byte-for-byte equivalent in the fields Maven actually uses: serverid(= domain),usernameaws, the masked CodeArtifact token aspassword, and a single<repository>(id = domain, url = CodeArtifact Maven URL). The token remains masked via the existing::add-mask::in the prior token step. So this is interface-compatible for downstream resolve/deploy.Alternatives considered
actions/setup-java's built-in settings.xml generator (the prevailing pattern for GitHub Packages) — rejected for this action. Verified againstsetup-java'ssrc/auth.ts: its generator emits only<servers>with${env.*}credential placeholders. That would (1) drop the<repository>resolve URL this action provides (consumer-critical), (2) force the token into the environment atmvntime, reversing this action's documented "token never in$GITHUB_ENV" property, and (3) couple a JDK install into a deliberately JDK-agnostic auth action. A rationale comment is recorded in-step.Ranking for this specific need: inline heredoc > setup-java > generic XML-editor action. The heredoc is the lowest-dependency, runtime-proof option.
Other
publish-maven-to-codeartifact/action.ymlto a permanent justification (# zizmor: ignore[unpinned-uses] -- trusted same-repo self-reference; pinned to the branch-protected default branch by design).@mainis intentional for a same-repo self-reference — SHA-pinning it would force a SHA bump on every action edit.ignore[archived-uses]justification is gone with the step — one fewer ignore.mirror-maven-jar/action.ymluntouched.Validation (static only — actions need AWS OIDC to run live)
yaml.safe_load).run:script as GitHub Actions parses it from the YAML block scalar; confirmed indent-stripping lands<settings>and the closingEOFat column 0 (heredoc terminates correctly), then rendered it through bash with a CodeArtifact-style token containing+ / =→ well-formed XML with correctserver.id/username/password/repository.id/url, andserver.id == repository.id(the id-DaltDeploymentRepositorydeploy auth resolves against).zizmor --persona auditor(superset of pedantic): No findings to report. (1 ignored) — the single remaining ignore is the same-repo self-referenceunpinned-usesinpublish-maven-to-codeartifact.actionlinttargets.github/workflows/, not compositeaction.ymlfiles, so it does not apply here.Consumer note
The consumer overture-matchers (#287) should re-run its dev-publish validation (resolve + deploy) against branch
harden-codeartifact-actions-node24before this merges, since thesettings.xmlwriter changed.Part of OvertureMaps/ops-team#384
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com