mattwparas / steel

An embedded scheme interpreter in Rust
Apache License 2.0
981 stars 46 forks source link

Build & Deploy docker image on each commit #220

Closed kskarthik closed 1 week ago

kskarthik commented 4 weeks ago

This github action builds the docker image from master branch on each commit & upload to docker hub

This is WIP as we did not decide the docker hub username

mattwparas commented 3 weeks ago

This github action builds the docker image from master branch on each commit & upload to docker hub

This is WIP as we did not decide the docker hub username

Thanks! Is there a docker hub alternative or is that the standard place to publish?

kskarthik commented 3 weeks ago

Github also has a container registry https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry

No need for a separate account in this case

mattwparas commented 3 weeks ago

Got it - to start I can create a docker hub account, and then we can publish to github as well?

kskarthik commented 3 weeks ago

@mattwparas Yes, Let's continue with dockerhub first

mattwparas commented 2 weeks ago

Apologies for the delay - I need to create a docker hub account for steel explicitly; I think that makes more sense than publishing it under my own name

kskarthik commented 2 weeks ago

Apologies for the delay - I need to create a docker hub account for steel explicitly; I think that makes more sense than publishing it under my own name

Yes, Please share the related dockerhub username

mattwparas commented 1 week ago

Apologies for the delay - I need to create a docker hub account for steel explicitly; I think that makes more sense than publishing it under my own name

Yes, Please share the related dockerhub username

Username is: steelscheme - I've added the docker hub password to the secrets

kskarthik commented 1 week ago

@mattwparas Ok, I have finished the refactoring. Just making sure that the secret name is DOCKER_HUB_PWD

Then, It's ready to merge

mattwparas commented 1 week ago

@mattwparas Ok, I have finished the refactoring. Just making sure that the secret name is DOCKER_HUB_PWD

Then, It's ready to merge

Yep, thats the secret name. Is it okay to just overwrite latest like that on each commit? I suppose since I haven't cut any specific tags it should be fine

kskarthik commented 1 week ago

There can be two options:

Regarding the dockerhub behaviour, The current latest tag always gets overwritten. So you only have one latest image in the docker repo. the hash changes. The docker pull steelscheme/steel:latest will pull the latest hash of the image.

mattwparas commented 1 week ago

There can be two options:

  • We can use latest docker tag until you start tagging in git & later on docker latest tag only points to recent git tag.
  • use the master tag which denotes the corresponding branch name in git

Regarding the dockerhub behaviour, The current latest tag always gets overwritten. So you only have one latest image in the docker repo. the hash changes. The docker pull steelscheme/steel:latest will pull the latest hash of the image.

Cool, in that case I think for now I'll just have it tag latest and push there. When I start running some tags to cut real releases then we can update the publish step to actually have some real versions