Environment Variables
brel authenticates with your forge and reads CI metadata through environment variables. The workflows generated by brel init wire these up automatically; you only need to set them yourself for local runs or hand-written pipelines.
GitHub
Section titled “GitHub”| Variable | Used by | Description |
|---|---|---|
GH_TOKEN |
release-pr |
GitHub token, checked first. The generated workflow sets GH_TOKEN: ${{ github.token }}. |
GITHUB_TOKEN |
release-pr |
Fallback when GH_TOKEN is unset. |
GITHUB_EVENT_PATH |
tag (event mode) |
Path to the merge event payload; provided automatically by GitHub Actions. |
BREL_TAG_PUSH_TOKEN |
generated workflow | Repository secret holding a PAT with Contents: Read and write, required for tagging-on-merge. |
brel release-pr on GitHub also requires the gh CLI to be installed.
GitLab
Section titled “GitLab”| Variable | Used by | Description |
|---|---|---|
BREL_GITLAB_TOKEN |
release-pr, tag (event mode) |
Access token with API and repository write access. Add it as a masked CI/CD variable. |
CI_API_V4_URL |
release-pr, tag |
GitLab API base URL, e.g. https://gitlab.com/api/v4. Provided by GitLab CI. |
CI_PROJECT_ID |
release-pr, tag |
Numeric project ID. Provided by GitLab CI. |
GitLab CI supplies further CI_* metadata (server host, project path, commit info) automatically. For local runs you must provide the essentials yourself:
BREL_GITLAB_TOKEN=... \CI_API_V4_URL=https://gitlab.com/api/v4 \CI_PROJECT_ID=123 \brel release-prForgejo
Section titled “Forgejo”| Variable | Used by | Description |
|---|---|---|
BREL_FORGEJO_TOKEN |
release-pr |
Forgejo access token, checked first. |
FORGEJO_TOKEN |
release-pr |
Second choice. |
GITHUB_TOKEN |
release-pr |
Final fallback (Forgejo Actions exposes GitHub-compatible names). |
FORGEJO_SERVER_URL / GITHUB_SERVER_URL |
release-pr |
Base URL of the Forgejo instance. Provided by Forgejo Actions. |
FORGEJO_REPOSITORY / GITHUB_REPOSITORY |
release-pr |
owner/repo slug. Provided by Forgejo Actions. |
FORGEJO_EVENT_PATH / GITHUB_EVENT_PATH |
tag (event mode) |
Path to the merge event payload. |
BREL_TAG_PUSH_TOKEN |
generated workflow | Secret with repository write access, required for tagging-on-merge (the automatic forgejo.token doesn’t trigger downstream tag-push workflows). |
For each pair, the FORGEJO_* name wins; the GITHUB_* alias is a fallback. See the Forgejo guide.
Gitea is currently a config value only — brel release-pr and event-mode brel tag error when provider = "gitea", so no environment variables apply yet. See the Gitea guide.