---
url: /en/repo/settings-tag.md
description: >-
  Explains how to configure automatic tag creation via .cnb/settings.yml,
  specifying which branch triggers tag auto-generation to standardize version
  tagging workflows.
---
Configure the branch that triggers automatic tag creation, so tags are automatically generated when code is pushed.

## Use Cases

* Automatically create tags when pushing to a specific branch (e.g., hotfix branch)
* Standardize the version tag generation process
* Reduce the overhead of manually creating tags

## Configuration

Add the `tag` configuration to `.cnb/settings.yml`:

```yaml title=".cnb/settings.yml"
# Tag configuration, reads the .cnb/settings.yml configuration from the repository's default branch
tag:
  # Auto tag generation configuration
  auto_tag:
    # Specify the branch name for triggering auto tag. If not configured, the repository's default branch is used
    branch: hotfix
```

## Parameter Reference

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `tag.auto_tag.branch` | string | Repository default branch | The branch name that triggers automatic tag creation |

:::tip
If the `branch` parameter is not configured, the repository's default branch is used to create tags.
:::
