ponylang / shared-docker

Dockerfiles that are useful across Ponylang repositories
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Put shared images in both GitHub Container Registry and DockerHub #54

Closed SeanTAllen closed 1 year ago

SeanTAllen commented 1 year ago

We are going to transition away from DockerHub as the open source plan limits the number of admin users we can have. This means that in addition to having to maintain different access lists (GitHub and DockerHub) for committers, we also have to juggle committer access on DockerHub as we can't ever have more than 3 accounts.

This commit updates all our existing builders to push to both GitHub Container Registry and DockerHub. I did the changes in a way that will make it easy to delete large chunks of the build-and-push scripts once we drop DockerHub.

All action jobs that logged in to DockerHub have a corresponding login to GitHub Container Registry added as well. Once we transition, the DockerHub login steps can be deleted.

This commit also adds steps to delete untagged images for ones that are updated daily with "nightly" or "release" tags. Once we have a new nightly builder of image "X", we don't need to keep the old images around. Keeping them around will really clutter up the UI. Given that an image might be in the process of being pulled elsewhere, we keep around 1 copy of each to avoid "ships passing in the night" errors.

The actionlint image has already been manually generated and is in GitHub Container Registry. All the other images are created on release or for each nightly. Once the first image is added, I will have to manually go into the GitHub UI and set the images as "public" for visibility so that people who aren't part of the ponylang organization can see and use them. This is a one-time step that has to be done when the first instance of an image is pushed.