Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag Docker images with Git SHA #301

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Conversation

br3ndonland
Copy link
Contributor

Description

Closes #290

PR #230 updated the action to pull Docker images from GHCR instead of building Docker images each time the workflow runs. As part of this PR, a new GitHub Actions workflow was added that builds Docker images and pushes them to GitHub Container Registry (GHCR).

Actions can be referenced in various ways.

The Docker build workflow covers most of the action references, but does not push Docker images tagged with the Git commit ID (Git SHA).

Changes

This PR will add Docker tags for referencing the action with a Git SHA.

GitHub Actions only supports references by the full 40 character SHA. If users try to reference the action by a short SHA like 1234567, they will get an error like, "Unable to resolve action pypa/gh-action-pypi-publish@1234567, the provided ref 1234567 is the shortened version of a commit SHA, which is not supported. Please use the full commit SHA 1234567890123456789012345678901234567890 instead."

Related

PR pypa#230 updated the
action to pull Docker images from GHCR instead of building Docker images
each time the workflow runs. As part of this PR, a new GitHub Actions
workflow was added that builds Docker images and pushes them to GitHub
Container Registry (GHCR).

Actions can be referenced in various ways. The Docker build workflow
covers most of the action references, but does not push Docker images
tagged with the Git commit ID (Git SHA).

This commit will add Docker tags for referencing the action with a Git
SHA. GitHub Actions only supports references by the full 40 character
SHA. If users try to reference the action by a short SHA like `1234567`,
they will get an error like, "Unable to resolve action
`pypa/gh-action-pypi-publish@1234567`, the provided ref `1234567` is the
shortened version of a commit SHA, which is not supported. Please use
the full commit SHA `1234567890123456789012345678901234567890` instead."

pypa#230
pypa#290
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-pre-written-building-blocks-in-your-workflow#using-shas
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@webknjaz webknjaz merged commit 93e8795 into pypa:unstable/v1 Nov 15, 2024
5 checks passed
@br3ndonland br3ndonland deleted the ghcr-sha branch November 15, 2024 19:17
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.

Unable to find image 'ghcr.io/pypa/gh-action-pypi-publish:61da13deb5f5124fb1536194f82ed3d9bbc7e8f3'
2 participants