This document will cover the ways in which one can create and publish docker image using opensrp docker workflow. The workflow being referred to here can be found here and for web here. We build docker images for both linux/amd64 and linux/arm64 architecture for opensrp server web and linux/amd64 for opensrp web.
Description of various sections of the workflow (using the one for opensrp server web)
# Publish `master` as Docker `master` tag.
# See also https://github.com/crazy-max/ghaction-dor-meta#basic
# Publish `v1.2.3` tags as releases.
# Run Tests when changes are made to the Docker file
description: "Includes the specified tag to docker image tags"
Here we specify when the workflow should be triggered. On the above scenario we have the workflow being triggered when:
Git tag prefixed with v* are pushed to the repository.
Pull Request - When a pull request is created with changes on the Dockerfile a docker build is triggered to ensure that docker build goes smoothly.
Workflow Dispatch (Manual Trigger)
This allows one to manually trigger the workflow to build and publish docker image to the respective repositories. One can choose which branch to use or/and which name to use for the of the docker image, if the tag section is left as blank the branch name will be used.
Here we list the jobs or tasks for the workflow. We have two jobs namely: test and push
test: Responsible for testing the docker image build process.