jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.83k stars 187 forks source link

[docker] Added fix to run image release on tags creation + backfill action #2118

Closed mohsenari closed 4 weeks ago

mohsenari commented 1 month ago

Summary

Github action for releasing docker images to dockerhub didn't run when we created a new tag (0.11.0) this fixes that issue. Plus I added a new github action that can only be triggered manually. It takes inputs for tag/version name and releases docker image to dockerhub at that specific tag. This is to backfill older versions of devbox to dockerhub as well.

How was it tested?

Will have to be tested via github actions run on a tag creation. But backfill will be tested manually

mohsenari commented 1 month ago

I'm a bit confused by this action. It doesn't seem like the version is added to the image at all? Is this just meant to refresh the latest image? (DEVBOX_USE_VERSION is not set, so it looks like no matter what the docker image will use the latest version)

The repo checkout action checks out the code at the provided tag. But good point on not having DEVBOX_USE_VERSION I added that to the build args for dockerfile and the action. I tested the docker build locally to make sure it builds the provided version.

Also, are the actions identical? You should just add workflow_dispatch to existing one and can have ref defaulted correctly.

The actions are similar but not identical. Frankly, I don't know how I can branch the logic in a YAML file to do the current tag and update latest if inputs aren't provided. This action can be deleted once we successfully backfill the older devbox versions in dockerhub

@mikeland73