gh-action-pypi-publish: Unable to find image 'ghcr.io/pypa/gh-action-pypi-publish:61da13deb5f5124fb1536194f82ed3d9bbc7e8f3'
After bumping to v1.12.0 publishing to TestPyPI is failing:
Unable to find image 'ghcr.io/pypa/gh-action-pypi-publish:61da13deb5f5124fb1536194f82ed3d9bbc7e8f3' locally
docker: Error response from daemon: manifest unknown.
Full logs at the workflow run
Here’s the relevant section of my workflow (which is pretty much boilerplate):
publish-to-testpypi:
name: Publish package to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/atsdk
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@61da13deb5f5124fb1536194f82ed3d9bbc7e8f3 # v1.12.0
with:
skip-existing: true
attestations: true
repository-url: https://test.pypi.org/legacy/
If I was to take a wild guess at why this is happening, it would be permissions for the new Docker images, which might be available to testers, but not yet public.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 16 (10 by maintainers)
Commits related to this issue
- Tag Docker images with Git SHA PR https://github.com/pypa/gh-action-pypi-publish/pull/230 updated the action to pull Docker images from GHCR instead of building Docker images each time the workflow r... — committed to br3ndonland/gh-action-pypi-publish by br3ndonland 2 years ago
- Fix release workflow Reusable workflows are not really supported by the action at the moment (apparently). This should be fixed by migrating to a standalone publish workflow, which is not called as p... — committed to salt-extensions/salt-extension-copier by lkubb 2 years ago
- Another attempt at fixing publishing. https://github.com/pypa/gh-action-pypi-publish/issues/283 https://github.com/pypa/gh-action-pypi-publish/issues/290 — committed to uclahs-cds/tool-pypi-publish-action by aholmes a year ago
- Another attempt at fixing publishing. https://github.com/pypa/gh-action-pypi-publish/issues/283 https://github.com/pypa/gh-action-pypi-publish/issues/290 — committed to uclahs-cds/tool-pypi-publish-action by aholmes a year ago
@ludwiglierhammer previously, the docker container was pre-built before all the steps in your job. Currently, it’s not built but downloaded from GHCR, but the corresponding network access is happening when the job reaches the step with this action. So earlier, your hardening was being applied after the network access related to building the image (so it was before any network traffic was being blocked) and now, it’s happening after the firewall is in place.
If anyone is also having an error when switching to v1.11.0 of
ERROR InvalidDistribution: Unknown distribution format: 'XXXXX.whl.publish.attestation', make sure you setattestations: falsewithin your release step. See #283 for more info.I had the same issue today with a GH Action that has been working for quite a while
the first error I got was a bit misleading since it said “docker: invalid reference format: repository name (owasp-sbot/OSBot-GitHub-Actions) must be lowercase.” (see https://github.com/owasp-sbot/OSBot-Utils/actions/runs/11723153140/job/32656045035#step:4:209 )
once I made that lowercase, I got another error saying “Unable to find image ‘ghcr.io/owasp-sbot/osbot-github-actions:dev’ locally” (see https://github.com/owasp-sbot/OSBot-Utils/actions/runs/11723801117/job/32656257025#step:4:209 )
my temporary workaround was to change in my GH Action
uses: pypa/gh-action-pypi-publish@release/v1into
uses: pypa/gh-action-pypi-publish@v1.11.0