# 4.3.5.2 Building, pushing & releasing your countryconfig code

When you merge any pull request into the "main", "master" or "develop" branch, or if you explicitly run the "Publish image to Dockerhub" Gthub Action, a docker container image will be built and pushed to Dockerhub for your **countryconfig** microservice.

{% embed url="<https://youtu.be/jFN2RLmhnfA>" %}

Now that you have configured repository secrets for Dockerhub access, you will notice that this action can be successfully run.

<figure><img src="https://content.gitbook.com/content/l7Cjlh2y2hlCBlt6R76C/blobs/asVQDczMuMv2m0magK4s/Screenshot%202024-02-13%20at%2014.00.06.png" alt=""><figcaption></figcaption></figure>

If you look at the logs for each build, you can see the image tag associated with the Docker container image.  You use this tag in the Deploy action.

<figure><img src="https://content.gitbook.com/content/l7Cjlh2y2hlCBlt6R76C/blobs/uJdCBdI5ui1jOT9E0VOQ/Screenshot%202024-02-13%20at%2014.01.34.png" alt=""><figcaption><p>A Docker container image pushed with the tag: d81d0ad</p></figcaption></figure>

### Publishing a release

If you want to use release management to keep track of your completed, production ready deployments - which is strongly recommended, we provide an example "Publish release" Github Action.

This action will create an issue which your Github admins are required to approve.  Once approved, a Git release will be created and an officially tagged release image will be built on Dockerhub.

Change the highlighted Git usernames from us, to your repo admins in the .github/workflows/publish-release.yml order to take advantage of this process.

<figure><img src="https://content.gitbook.com/content/l7Cjlh2y2hlCBlt6R76C/blobs/JnbWIkThPCFJIW48SZ7S/Screenshot%202024-02-13%20at%2014.05.14.png" alt=""><figcaption><p>Change the approvers list to the Git usernames of your repo admins</p></figcaption></figure>
