# 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://3485090019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRziAMaeBMeyiTg5hfFq5%2Fuploads%2Fgit-blob-a0ccfed18cfe03b729cb62a64a30e3254504a20a%2FScreenshot%202024-02-13%20at%2014.00.06.png?alt=media" 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://3485090019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRziAMaeBMeyiTg5hfFq5%2Fuploads%2Fgit-blob-df3d775ab56c64115eeeed89ac54cfdd74a1ce9e%2FScreenshot%202024-02-13%20at%2014.01.34.png?alt=media" 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://3485090019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRziAMaeBMeyiTg5hfFq5%2Fuploads%2Fgit-blob-113c5510ee1811957a73b6da3f5bee109e2a89a7%2FScreenshot%202024-02-13%20at%2014.05.14.png?alt=media" alt=""><figcaption><p>Change the approvers list to the Git usernames of your repo admins</p></figcaption></figure>
