Repository navigation
ci: publish npm packages to CodeArtifact alongside Nexus - #7
Merged
Merged
Conversation
Adds a best-effort CodeArtifact publish leg after the existing Nexus publish so consumers can migrate off Nexus independently. Nexus stays authoritative: every CodeArtifact step is continue-on-error and gated on the previous one, so a CodeArtifact problem can neither fail a release nor run half-configured. Part of the Nexus to CodeArtifact migration (DEVOPS-1222).
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.
What
Appends a best-effort CodeArtifact publish leg to the publish job, right after the existing Nexus publish:
vars.ENVIRONMENT_PUBLISH_AWS_OIDC_IAM_ROLE_ARN).$GITHUB_OUTPUT) and resolves thenpm-empgendpoint.npm publish --registry <CodeArtifact endpoint>from the repo root, mirroring the Nexus publish.It also adds the job-scoped
permissions:block OIDC needs (id-token: write), which as a side effect narrows the defaultGITHUB_TOKENdown tocontents: read.Why
Part of the Nexus → CodeArtifact migration (DEVOPS-1222). Publishing to both registries lets consumers move across one at a time; Nexus stays authoritative until they have.
Safety
continue-on-error: trueand gated on the previous step's outcome, so a CodeArtifact problem can neither fail a release nor run a half-configured step.npm publish --registryoverridespublishConfig.registryon npm ≥ 10.8.2 —.nvmrcpins node 20.19.0 ⇒ npm 10.8.2 — so nopackage.jsonis mutated.zizmor: the newpermissions:block clears theexcessive-permissionsfinding this workflow had before; the only new finding isunpinned-useson the tag-pinnedSectorLabs/actions/configure-aws, which is the same form used everywhere else in the org and by the repos already migrated.Validating
The IAM role trusts
v*tag refs only, so this leg cannot be exercised from a PR run — the first real check is the next release tag. Read the Report CodeArtifact result line in that run's summary rather than the step ticks:continue-on-errorreports a failed step as green.