Closed sosedoff closed 1 year ago
One concern here is that we will need to remember to update version number in 2 places ... can we just lean on version.rb somehow? Maybe we add the file... parse the version out?
The goal is to have a totally automated workflow for pushing docker images - when a new tag is made, github will first trigger the current gem release workflow, and once its complete and passing, we'll trigger the docker release workflow automatically. I didnt include the changes at first since i was not sure if you wanted to have an official image in the first place.
Oh ... nice, cool lets merge it in then once that is ready. Sounds great!
This should be ready. I tested the release step via my private repo and pushed out to docker hub:
For local docker build the GEM_VERSION is not set and it should install the latest version of the gem. In Github Actions we're pulling the version from the vX.X.X
tag.
Make sure to set DOCKER_USERNAME
and DOCKER_PASSWORD
actions secrets.
thanks @sosedoff ... let me have a quick chat with the infra team they have been trying to keep discourse/
pretty lean on dockerhub .... we always have alternatives like just using your personal repo... will get back to you
@sosedoff discussed internally and we would prefer to publish to https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
Can you adjust to suit?
Yea no sweat, its super easy to swap out docker providers.
@sosedoff I just tried cutting a new version but the CI never ran for pushing the image... any ideas what is up... I can see the new tag.
Maybe cause the ci pushed the tag this is not "catching"
Im not entirely sure tbh, it looks like the release is done in via rake release
which should push tags via normal channels (ie git push ..), but i'm suspecting this is not working due to push originating from the actions run. Will repro and fix.
Thanks heaps @sosedoff
This would help running the exporter service in Docker, using the official image so folks dont have to make their own. I will also include CI/CD workflow for releasing new multi platform docker images (when a new gem version is release) if the proposal is sound.