> For the complete documentation index, see [llms.txt](https://documentation.opencrvs.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.opencrvs.org/v1.6/setup/3.-installation/3.3-set-up-a-server-hosted-environment/4.3.5-provisioning-servers/4.3.5.2-building-pushing-and-releasing-your-countryconfig-code.md).

# 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/YTKQAa9NKqMdS5tq1TB3/blobs/uG6D9nJC6XU9s8kILCJR/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/YTKQAa9NKqMdS5tq1TB3/blobs/CgnMXTf7CU93lGQxwxLT/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/YTKQAa9NKqMdS5tq1TB3/blobs/vGuOm7QCX0is8R50LsOm/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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.opencrvs.org/v1.6/setup/3.-installation/3.3-set-up-a-server-hosted-environment/4.3.5-provisioning-servers/4.3.5.2-building-pushing-and-releasing-your-countryconfig-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
