Commit ef815ea
authored
fix(ci): stop nesting pypa/gh-action-pypi-publish in a composite action (#94)
* fix(ci): stop nesting pypa/gh-action-pypi-publish in a composite action
Confirmed against four real release runs today: pypa/gh-action-pypi-publish
is a Docker container action, and GitHub resolves its image using the
wrapping action's own repository and ref rather than the Docker action's
when nested inside another `uses:` -- every publish failed with `docker:
invalid reference format`, trying to pull
ghcr.io/reqstool/.github:<this-action's-own-sha>. The action's own
maintainers say this usage is untested and unsupported.
This is exactly what the workaround comment linked from #92's PR
description already said -- upload as a bare step in the caller, not
routed through anything else -- and actions/publish-to-pypi violated it
by wrapping the publish step instead of just inlining it. Deleting the
composite action rather than trimming it to only download-artifact: what
remains is one actions/download-artifact call, not enough indirection to
be worth a shared action, and every layer added here tonight has broken
in a new way.
Companion PRs inline both steps directly into each PyPI-publishing repo's
release.yml.
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* refactor(ci): keep the composite action, drop only the publish step
Reworks the previous commit, which deleted the action outright on the
mistaken premise that composite actions were the problem. They are not:
a composite action creates no new workflow context, so the job keeps the
caller's OIDC identity -- which is exactly why it works where a reusable
workflow does not. Someone makes the same point for Ruby in
pypi/warehouse#11096.
Only pypa/gh-action-pypi-publish has to come out. It is a Docker
container action, and GitHub resolves a nested Docker action's image
against the wrapping action's repository rather than its own -- the
action's own maintainer describes the same breakage in that thread.
Renamed publish-to-pypi -> download-dists, since what remains downloads
the distributions and deliberately does not publish them. Keeping the
old name would have been the misleading part.
RELEASING.md's PyPI notes corrected while here. Two claims in the
previous commit were wrong: PyPI matches `job_workflow_ref`, the
bottom-most workflow, not the top-level caller; and reusable workflows
are not rejected categorically -- one in the *same* repo as its caller
works by accident of that same rule. What fails is a cross-repo one like
this repo's, which puts reqstool/.github in the claim where the calling
project has to be.
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
---------
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>1 parent b10b898 commit ef815ea
3 files changed
Lines changed: 68 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
135 | 147 | | |
136 | 148 | | |
137 | 149 | | |
| |||
200 | 212 | | |
201 | 213 | | |
202 | 214 | | |
203 | | - | |
| 215 | + | |
| 216 | + | |
204 | 217 | | |
205 | 218 | | |
206 | 219 | | |
| |||
0 commit comments