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. DetailsInstructions 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 |
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_NAMEenvironment variable for the tag. Unforuntiatly that value would end up being just the branch name ofmaster. Instead suggest to use theGITHUB_SHAvariable to tag every image built with the commit hash. This change will still tag the head of themasterbranch 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