-
Notifications
You must be signed in to change notification settings - Fork 706
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
Use commit hash for image tag #11233
Conversation
Hi @montaguethomas. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Turns out [GITHUB_REF_NAME](https://docs.github.com/en/actions/learn-github-actions/variables) will match the branch name instead of a git describe value.
Code Climate has analyzed commit af429e2 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 58.4%. View more on Code Climate. |
/packit build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Description:
Currently all published images can only be referenced by image digest. These image digests cannot be linked to the actual commit or tag it was built for. The workflow recommends to use the
GITHUB_REF_NAME
environment variable for the tag. Unforuntiatly that value would end up being just the branch name ofmaster
. Instead suggest to use theGITHUB_SHA
variable to tag every image built with the commit hash. This change will still tag the head of themaster
branch aslatest
.Rationale:
By using the git reference variable for the tag, it makes it clear which commit/tag the image was built from in the image versions list: https://github.com/ComplianceAsCode/content/pkgs/container/k8scontent/versions