[ENHANCEMENT] Add pypi format support to setup-codeartifact - #80
Open
John McCall (lowlydba) wants to merge 2 commits into
Open
[ENHANCEMENT] Add pypi format support to setup-codeartifact#80John McCall (lowlydba) wants to merge 2 commits into
John McCall (lowlydba) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
There was a problem hiding this comment.
Pull request overview
This PR enhances the .github/actions/setup-codeartifact composite action to support authenticating against AWS CodeArtifact for both Maven and Python (PyPI), using the same OIDC role-assumption and token acquisition flow.
Changes:
- Adds a
formatinput (mavendefault,pypioptional) and validates allowed values. - Introduces PyPI-specific outputs for pip/uv usage (
pypi-index-url,pypi-publish-url) and documents the new mode in the README. - Keeps Maven behavior unchanged by gating
settings.xmlgeneration behindformat: maven.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/actions/setup-codeartifact/README.md | Documents the new format: pypi mode and its outputs/usage patterns. |
| .github/actions/setup-codeartifact/action.yml | Implements format validation, gates Maven settings generation, and adds PyPI URL outputs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
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.
Context
Part of migrating off the Legacy Airflow account's CodeArtifact (OvertureMaps/ops-team#299). Phase 1 for pypi (OvertureMaps/ops-team#455) replicates the legacy
overture-pypidomain into MCD and dual-publishes to both accounts. The publish workflows for that (OvertureMaps/ops-team#466) need pypi auth from this shared action, which is Maven-only today.Today each repo carries its own variant of this auth logic (schema's local
code-artifactaction, bespoke steps elsewhere). Extending the shared action instead of forking another copy keeps it DRY: one auth path to audit and update, and the local variants can be deleted as workflows migrate.Adds a
formatinput (mavendefault, orpypi) tosetup-codeartifactso python packages can auth through the same OIDC + token path as Maven.Fixes OvertureMaps/ops-team#466.
mavenbehavior is unchanged for existing callers: samerepository-urlvalue,settings.xmlstill written, no input changes needed.pypiskipssettings.xmland adds two outputs:pypi-index-url(token embedded, masked, for pip/uv--index-url) andpypi-publish-url(no credentials, foruv publish --publish-urlwith the token passed separately). Modeled on schema's localcode-artifactaction, which this eventually replaces.For dual-publishing, workflows call the action twice per job (legacy + MCD account) and run the publish step once per instance.