Skip to content

fix(ci): inline the PyPI publish step instead of a composite action - #93

Merged
jimisola merged 2 commits into
mainfrom
fix/pypi-publish-not-nested-in-composite
Aug 23, 2026
Merged

fix(ci): inline the PyPI publish step instead of a composite action#93
jimisola merged 2 commits into
mainfrom
fix/pypi-publish-not-nested-in-composite

Conversation

@jimisola

@jimisola jimisola commented Aug 23, 2026

Copy link
Copy Markdown
Member

Description

Companion to reqstool/.github#94 — see
reqstool/.github#95, including the
corrections in the second comment
.

Today's real release run failed at publish-to-pypi:

docker run ... ghcr.io/reqstool/.github:b10b898cd5a1d552a578dbe4f170f84fb8f98b6c
docker: invalid reference format

pypa/gh-action-pypi-publish is a Docker container action, and nesting one inside a
composite action makes GitHub resolve its image against the wrapping action's repository
rather than its own. Its own maintainer
describes the same breakage.

The composite action itself was fine — it creates no new workflow context, so the job keeps
this repo's own OIDC identity, which is why it works where a cross-repo reusable workflow
does not. So only the publish step comes out.

What changes

      - uses: reqstool/.github/.github/actions/download-dists@main
        with:
          artifact: dist-tagged
      # Inline, not inside download-dists: nesting this Docker action in a
      # composite action makes GitHub resolve its image against the wrapper's repo.
      - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
        with:
          attestations: true

download-dists is actions/publish-to-pypi renamed — it no longer publishes.

Needs reqstool/.github#94 merged first, and the @main reference gets pinned to a commit
SHA before this merges (no SHA exists to pin to until #94 lands).

Checklist

Test plan

YAML validated locally. The real test is a dispatch reaching a successful publish-to-pypi
no local check catches this class of bug.

pypa/gh-action-pypi-publish is a Docker container action. Nested inside
reqstool/.github's actions/publish-to-pypi composite action, GitHub
resolved its image using the composite action's own repo and pinned
ref instead of the Docker action's, and every real publish failed with
`docker: invalid reference format`. The action's own maintainers say
this usage is untested and unsupported.

Both steps -- download-artifact and the actual publish -- are now
inline, matching the pattern the upstream workaround comment already
showed (see reqstool/.github#95 for the full writeup). There is no
shared action for this step in the org at all now; what remained after
removing the publish call wasn't enough to justify one.

Needs reqstool/.github#94 merged first.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Reworks the previous commit. Composite actions were not the problem --
one creates no new workflow context, so the job keeps this repo's own
OIDC identity, which is why it works where a reusable workflow does not.
Only pypa/gh-action-pypi-publish had to come out of it, because nesting
a Docker container action makes GitHub resolve its image against the
wrapping action's repository.

So the download goes back to a shared action, renamed download-dists
now that it no longer publishes, and only the publish step stays inline.

Still pinned at @main here; reqstool/.github#94 has to merge before a
commit SHA exists to pin to. That pin lands before this PR merges.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
id-token: write
steps:
- uses: reqstool/.github/.github/actions/publish-to-pypi@b10b898cd5a1d552a578dbe4f170f84fb8f98b6c # main 2026-08-23
- uses: reqstool/.github/.github/actions/download-dists@main
@jimisola
jimisola merged commit c707272 into main Aug 23, 2026
13 checks passed
@jimisola
jimisola deleted the fix/pypi-publish-not-nested-in-composite branch August 23, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants