CCBR / Dockers

A collection of Dockerfiles to facilitate reproducibility across computing environments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CI workflow to run `buildnpush` script when Docker files change

kelly-sovacool opened this issue · comments

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?

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.

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.