ibLeDy / timezone-converter

Whole-day timezone comparison
MIT License
13 stars 6 forks source link

Add automated Docker image build and push to the `deployment` workflow #43

Closed ibLeDy closed 1 year ago

ibLeDy commented 2 years ago
FaithKovi commented 2 years ago

Hello, @ibLeDy I would like to work on this issue. Is there any specification you would want in implementing this? Like which registry to push to and perhaps the naming convention for the image you would want.

ibLeDy commented 2 years ago

Hello @FaithKovi , I just updated the description of the issue adding initial requirements. I've also assigned you the issue. Thanks in advance!

FaithKovi commented 2 years ago

@ibLeDy For the second one, do yo mean the tag should be the github commit SHA that triggered the workflow?

ibLeDy commented 2 years ago

@FaithKovi

This automation should be added to the deployment workflow, which is triggered once a new release is created on Github:

https://github.com/ibLeDy/timezone-converter/blob/ee8c8b8e2a47c1576b52c113eb2319d4169bcd50/.github/workflows/deployment.yml#L3-L6

As you can see below, I use SemVer, all of the releases have the version in the title, and the commit gets tagged, so I guess the easiest and most consistent would be to use the commit tag (and then removing the v prefix).

https://github.com/ibLeDy/timezone-converter/releases

FaithKovi commented 2 years ago

@ibLeDy I have created a pull request for this issue. Please review and let me know if there are changes to be made. There are two secrets to be added: DOCKERHUB_USERNAME and DOCKERHUB_TOKEN The workflow builds the docker image and pushes it to docker hub

ibLeDy commented 1 year ago

I had to do a small fix, but works as intended, thanks for your contribution!