# Generating Github Workflows

In order to simplify and standardize Github workflows, use the Projects feature on the Portal

{% stepper %}
{% step %}

### Connect your GitHub Account

<figure><img src="/files/6TOjg1N4xQfeaBMWTlZG" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### Choose the Repository  and Branch

If your repository doesn't have a Dockerfile, the Portal will offer help to created one for you:

<figure><img src="/files/gQv6DBXKs3KTsqoF5obr" alt=""><figcaption></figcaption></figure>

If one or more Dockerfiles already exists, you wil be asked to pick the one you want to use and click Continue

<figure><img src="/files/XlzE7jMzA4JaqHpSA6tJ" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Review the Workflow file and set Ports

The system will generate a GitHub workflow file that will be run every time a new version tag is created in the repository. The Workflow will build a Docker Image for your project following the Dockerfile instructions, publish the resulting  image, and create a docker-compose-secretvm.yaml file properly referencing the newly built image by its hash, and with comments specifying the exact release tag and commit from which the image was built.

**IMPORTANT: make sure to configure the ports correctly so that the docker-compose-secretvm.yaml file is generated correctly**

<figure><img src="/files/mk0gxmYzGQeLTNLUe7Kz" alt=""><figcaption></figcaption></figure>

&#x20;
{% endstep %}

{% step %}

### Create a new Version Tag to start the Worflow&#x20;

Choose a version tag (e.g. v1.0.0) and click "Continue"

<figure><img src="/files/YZfawD7pxxMOHxR00Qr5" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Wait for the Workflow to Finish, review results

<figure><img src="/files/PJNcG8KACTUVlVIIKqMB" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### Use docker-compose-secretvm.yaml

From now on, every time you create a new release of your project, the workflow will be executed, publishing a new Docker Image and updating your docker-compose-secretvm.yaml with the latest version. Make sure to pick docker-compose-secretvm.yaml from your project when creating new SecretVM instances.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scrt.network/secret-network-documentation/secretvm-confidential-virtual-machines/best-practices-for-developers/generating-github-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
