Closed kelly-sovacool closed 1 year ago
I think that was my original plan ... but I generally like to iteratively build-push-test-repeat ... so I have not implemented this CI/CD in practice ... but we sure can.
I have a demo of how we could implement this here: https://github.com/CCBR/CRUISE/blob/d42560d20aaab230322a77f1ee05cb7d27f95760/.github/workflows/docker.yml
We now have two github actions workflows that run on manual dispatch to build containers that accept different inputs:
build-docker-manual
takes the path to the dockerfile, the dockerhub namespace, and the tag. This is useful if you want to iterate quickly and have not created a meta.yml file.build-docker-meta
takes the path to a directory that contains the dockerfile and a meta.yml file which contains the namespace and tag. This allows you to save time not needing to re-enter container metadata, as it is stored in a meta.yml file, while still controlling exactly when a container is built.
This could run when a new file matching
Dockerfile*
is pushed to master. Would need to extract the version number from the path... Or maybe we start using Conventional Commits and use tools to figure out the version automagically?