Closed kkrizka closed 1 year ago
Hi @pandreetto,
I'm almost done with this. Just need to
I'm not sure why the Action isn't running in this PR. Could you please check the "Action" tab in Settings if something is disabled? There also might be an "Approve and run" button in your view above the "Merge pull request" button for you to click as I am an outside collaborator. Note that the CI would fail anyways and the secrets first need to be setup.
In the meantime, you can see the action in action in at fork and my DockerHub repository.
-- Karol Krizka
The new GitHub Action does two things:
The advantages are automated testing and deployment of the official images used by Muon Collider Collaboration. The testing goes beyond just making sure the images build. The automatically deployed work-in-progress images from Pull Requests can be pulled by users to test specific Processors. Long term, we can also add Actions that automatically test commonly used Processors.
This PR implements the standard docker/build-push-action@v2 workflow. Some important highlight are next.
Docker Image Tag
The images are tagged as "
${DOCKERHUB_REPOSITORY}/imagename:${steps.meta.outputs.version}-centos8
", where themeta
step is an execution of docker/metadata-action@v3. The version is eitherpr-#
(where # is the number of the PR),tag
(for tagged ref's) ormaster
(for direct pushes to master).One caveat is that the tag is taken directly. So the current tag format would result in an image named
infnpd/mucoll-ilc-framework:v.1.5-centos8
. There is support for semver formatted tags which strip thev
fromvX.Y.Z
. Our tag format is quite close to this, so it might be possible to use.Dockerfile Changes
The automatic repository / version information needs to be forwarded to the later stage Dockerfiles (Dockerfile-ilc-base and Dockerfile-ilc-framework). This PR replaces the hard-coded information with the following Docker arguments.
REPOSITORY
infnpd
VERSION
devel
The README instructions have been updated correspondingly.
Repository Secrets
The action expects the following variables to be defined as secrets.
DOCKERHUB_USERNAME
DOCKERHUB_TOKEN
DOCKERHUB_REPOSITORY
TODO