redhat-actions / push-to-registry

GitHub Action to push a container image to an image registry.
https://github.com/marketplace/actions/push-to-registry
MIT License
97 stars 32 forks source link

Enforce lowercasing of image and tag references. #56

Closed xee5ch closed 2 years ago

xee5ch commented 2 years ago

Description

This modification will enforce lowercasing the image and tag name of an image before pushing. Without this, using images and tags that are not exclusively lowercase will fail to push to a standards-compliant registry. In the context of GitHub repositories, matching a GitHub repo name, that might include uppercase letters, will be used to identify the registry or image name with the repository owner or repository itself. So without this, those images will never be pushable or require manual modification.

Related Issue(s)

Closes redhat-actions/push-to-registry#54.

Checklist

Changes made

Modified code to enforce lowercasing of image and/or tag as needed.

xee5ch commented 2 years ago

FYI, I do not know what to select re "This PR includes test changes" because there are no tests in this code base.

tetchel commented 2 years ago

The tests are in the workflows in .github/workflows, maybe we could add a job that tries to push a capitalized image name

xee5ch commented 2 years ago

The tests are in the workflows in .github/workflows, maybe we could add a job that tries to push a capitalized image name

Sounds good, I will work on that then!

xee5ch commented 2 years ago

Hmmm, it seems this would be something that would also be needed to the buildah-build GitHub Action now that I test it more thoroughly in xee5ch/push-to-registry#1 and bumped up around errors there. :laughing:

Should I continue with this or consider how to how to adapt the metadata sanitization approach recommended by the Docker team with that action instead?

divyansh42 commented 2 years ago

@xee5ch I think we can go ahead with these changes, as this change might help a set of users who are not aware of docker metadata action and may face workflow failures. Along with this change in Push to registry action, it will be good if we can make these changes in buildah build action as well.

Let me know if you want to work on buildah build action too, I can create a detailed issue for that.

Also, please rebase your PR.

xee5ch commented 2 years ago

@xee5ch I think we can go ahead with these changes, as this change might help a set of users who are not aware of docker metadata action and may face workflow failures. Along with this change in Push to registry action, it will be good if we can make these changes in buildah build action as well.

Great. Thanks for supporting this!

Let me know if you want to work on buildah build action too, I can create a detailed issue for that.

I can take care of it during this coming weekend, don't worry about it. :-)

Also, please rebase your PR.

Will do, sir, yessir!

divyansh42 commented 2 years ago

I can take care of it during this coming weekend, don't worry about it. :-)

Great, Thanks a lot! :smile:

xee5ch commented 2 years ago

Sorry, I dropped the ball two weeks ago. I created redhat-actions/buildah-build#89 and will begin work on it.

divyansh42 commented 2 years ago

@xee5ch is there any update on this PR? Thanks!

xee5ch commented 2 years ago

I am really sorry I dropped the ball on this. I will touch up some work and contribute it soon. Thanks for reminding me!

divyansh42 commented 2 years ago

I am really sorry I dropped the ball on this. I will touch up some work and contribute it soon. Thanks for reminding me!

Thanks for the update!

divyansh42 commented 2 years ago

@xee5ch: To get this fix early, I have pushed the updated commit in your PR. I hope you won't mind :)

xee5ch commented 2 years ago

@xee5ch: To get this fix early, I have pushed the updated commit in your PR. I hope you won't mind :)

I am a big flake. Yes, of course it's fine. I am sorry I didn't deliver in the demanding timeframe of six months (yes that was/is sarcasm and a joke).

I am happy you got to it before me! :laughing: