This is a mini CLI + Container image to check if a github release is newer than the respective Dockerhub image. If it is then it downloads the github asset so that you can create a Docker image out of it.
Run:
go build
to get the executable ORdocker build . -t dockerize-latest-version
to create a container image if you prefer docker instead or don't have access to a Go dev environment
A prebuilt image is already available at https://hub.docker.com/r/kostiscodefresh/dockerize-latest-version
This CLI can be used like
Run dockerize-latest-release --repo argoproj/argo-rollouts -asset kubectl-argo-rollouts-linux-amd64 -image kostiscodefresh/argo-rollouts-cli
. This will fetch the github details and save them to a file called asset-details.json
. It will also download kubectl-argo-rollouts-linux-amd64
locally
You can use this CLI in any CI/CD system and the Dockerhub image in any container based pipeline.
See an example for Codefresh at codefresh-example.yml
Currently it runs every 6 hours and pushes images to https://hub.docker.com/r/kostiscodefresh/glooctl/ and https://hub.docker.com/r/kostiscodefresh/kubectl-argo-rollouts