# GitHub Version Tags

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdeveloper-portal%2Fapis%2Fversion-tags%2Fgithub-version-tags.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdeveloper-portal%2Fapis%2Fversion-tags%2Fgithub-version-tags.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

GitHub Actions allows you to perform numerous tasks automatically, including using the cURL command to insert a new tag when a release is made or when a pull request is closed for example.

This tutorial demonstrates how to build an automation that will create a new tag in Coralogix upon publishing a new release of your code.

## Coralogix Version Tags API Endpoint[​](#coralogix-version-tags-api-endpoint "Direct link to Coralogix Version Tags API Endpoint")

This document includes cluster-dependent URLs.

Choose the <!-- -->https\://api./api/v1/external/tags<!-- --> endpoint that corresponds to your Coralogix [domain](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) using the domain selector at the top of the page.

## Tutorial[​](#tutorial "Direct link to Tutorial")

**STEP 1**. Create your Action as a .yml file inside our repository in the workflows directory .github/workflows/my-tag-automation.yml.

**Note**:

* Remember to place the .github folder inside the root folder of your repository.

**STEP 2**. Add the content of your action.

* Add the name of the automation and the events that activate it.

```
name: "Create a tag"

 

on:

  release:

    types: [published]
```

* Add the 'job' of our automation -- the action that it will execute.

```
name: "Create a tag"

 

on:

  release:

    types: [published]



jobs:

  run-updater:

    runs-on: ubuntu-latest

    steps:

    - name: create a tag

      run: |

        curl --location --request POST 'https://api.eu2.coralogix.com/api/v1/external/tags' \

        --header 'Authorization: Bearer <cx_api_key>' \

        --header 'Content-Type: application/json' \

        --data-raw '{ 

        "name": "'"${GITHUB_REF##*/}"'",

        "application": ["<my_app>"],

        "subsystem": ["<my_subsystem>"]

        }'
```

${GITHUB\_REF##\*/} = a github action variable holding the reference of the action , in this context its the tag of the release.

**`<my_app>`** - Your [Application name](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/application-and-subsystem-names/.md). You can input more than one name, use the comma delimiter ‘,’ between the names.

**`<my_subsystem>`** - Your [Subsystem name](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/application-and-subsystem-names/.md). You can input more than one name, use the comma delimiter ‘,’ between the names.

**`<cluster_endpoint>`** - Choose the <!-- -->https\://api./api/v1/external/tags<!-- --> endpoint that corresponds to your Coralogix [domain](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) using the domain selector at the top of the page.

**`<cx_api_key>`** - To use this API you need to [create](https://docs-docusaurus.kinsta.page/user-guides/account-management/api-keys/api-keys/.md) a personal or team API key. It’s recommended to use permission presets, as they are automatically updated with all relevant permissions. Alternatively, you can manually add individual permissions.

| Preset          | Action                                                                                                    | Description                                                                                        |
| --------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| CICDIntegration | `VERSION-BENCHMARK-TAGS:READ`<br />`VERSION-BENCHMARKS-REPORTS:READ`<br />`VERSION-BENCHMARK-TAGS:UPDATE` | View Version Benchmark Tags<br />View Version Benchmark Reports<br />Modify Version Benchmark Tags |

**STEP 3**. After publishing a new release, the Action will run, and a new tag in Coralogix will be created.

## Additional resources[​](#additional-resources "Direct link to Additional resources")

* [Understanding GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions)
* [cURL Coralogix Version Tags API Documentation](https://docs-docusaurus.kinsta.page/developer-portal/apis/version-tags/curl-version-tags/.md)
* [Coralogix Endpoints](https://docs-docusaurus.kinsta.page/integrations/coralogix-endpoints/.md)
