GitHub Action
The Localizer Action keeps your catalogs in sync from a GitHub Actions workflow. The workflow authenticates
with its short-lived GitHub OIDC token, so there is no API key to store. Localizer never gets write access
to your repository: the service returns the updated catalogs, and your workflow pushes the branch and opens
the pull request with the github-token input (its own GITHUB_TOKEN by default).
Set up
Section titled “Set up”-
Add
.github/workflows/localizer.yml:name: Localizeron:push:branches: [main] # your default branchworkflow_dispatch:permissions:contents: write # push the translations branchpull-requests: write # open the pull requestid-token: write # authenticate to Localizer with an OIDC tokenconcurrency:group: localizer # one run at a time: a second push waits for the firstcancel-in-progress: falsejobs:translations:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v7- uses: snizyx/localizer/action@v0.7.0 -
Turn on Settings → Actions → General → Workflow permissions → Allow GitHub Actions to create and approve pull requests. In an organization-owned repository, the organization’s own Actions settings must allow it as well, or the repository setting can’t be turned on.
-
Push, or run the workflow from the Actions tab. The first run opens the onboarding pull request.
Inputs
Section titled “Inputs”| Input | Default | Description |
|---|---|---|
github-token |
${{ github.token }} |
Token that pushes the translations branch and opens the pull request. Both git push and gh use it, whatever credentials actions/checkout kept. |
branch |
localizer-translations |
Branch for the translations pull request. |
timeout-minutes |
45 |
How long to wait for translations. |
api-url |
the Localizer service | Localizer API base URL. |
audience |
localizer |
Audience of the OIDC token. It must match the service. |
Outputs
Section titled “Outputs”| Output | Description |
|---|---|
status |
up-to-date, pr-opened or pr-updated |
pull-request |
URL of the translations pull request, if there is one |
- Pull requests created with
GITHUB_TOKENdon’t trigger other workflows. If required checks must run on the translations pull request, pass a GitHub App token or a fine-grained personal access token asgithub-token. - Only
push,workflow_dispatchandscheduleruns on a branch are accepted. The request to Localizer carries nothing but the workflow’s OIDC token, which names the repository running it, so a workflow in a fork can only sync the fork itself. - Localizer serves public repositories only.
- The Action writes only the files the service returns: catalogs, plus the setup files on the first run. It
writes only relative paths to
*.json,*.goand*.pyfiles,pyproject.toml, and.localizer.ymlin the repository root, and refuses everything else before writing anything: absolute paths, empty,.or..components, backslashes, colons or control characters, and any component that is.gitor.githubin any letter case (trailing dots and spaces ignored, as Windows drops them). One rejected path means nothing is written. - It commits as
github-actions[bot], force-pushes thebranchwith thegithub-tokeninput, and then updates the open pull request for that branch from your own repository, or opens one against the branch the workflow ran on. A pull request from a fork with the same branch name is never adopted. - Pin the Action to a release tag or, for the strongest guarantee, to a full commit SHA.
© 2026 Snizyx Software LLC