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

Most upvoted comments

@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.

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/v1

into

uses: pypa/gh-action-pypi-publish@v1.11.0

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 set attestations: false within 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/v1

into

uses: pypa/gh-action-pypi-publish@v1.11.0