Open CI and GitHub Action
Keep localization policy in your repository. Run the same immutable base/head check locally or with Polyglot's open GitHub Action on any plan, without connecting Polyglot Automation.
Run a differential check locally
polyglot check compares immutable Git revisions and evaluates the [ci] policy in polyglot.toml. The default no-new policy reports existing debt but fails when a pull request adds a new untranslated finding.
# Compare the branch against its immutable base
polyglot check --base <base-sha> --head <head-sha>
# Machine-readable result
polyglot check --base <base-sha> --head <head-sha> --format jsonExit 0 means the configured policy passed or is informational, 1 means the policy failed, and 2means analysis was incomplete. Treat exit 2 as fail-closed, never green.
Install the open GitHub Action
Commit a workflow your repo owns. Differential mode needs complete base history, so checkout must use fetch-depth: 0. No API key is required for the check itself.
name: Polyglot i18n
on:
pull_request:
branches: [main]
merge_group:
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: polyglot-i18n/polyglot-action@v1
with:
check-mode: differential
comment: 'false'What the Action does
- Installs a checksum-verified Polyglot CLI release.
- Resolves explicit base and head revisions for pull requests, merge queues, pushes, and manual runs.
- Fails closed when a required revision is unavailable instead of guessing.
- Evaluates the repository policy and validates the complete result contract.
- Emits bounded GitHub annotations without raw source excerpts.
Configure policy
[ci]
policy = "no-new"
# Start without blocking while you observe representative PRs.
enforcement = "informational"Move from informational to enforcing only after the baseline is stable. GitHub blocks a merge only when the workflow is successful, the policy is enforcing, and you configure its check as required in branch rules.
Optional authenticated reporting
The open Action runs differential checks in guest mode. Addapi-key only when you want bounded run metadata in an authenticated Polyglot project or default-branch translation-memory sync. Store the key as a GitHub secret; do not commit it.
- uses: polyglot-i18n/polyglot-action@v1
with:
api-key: ${{ secrets.POLYGLOT_API_KEY }}
check-mode: differential
sync: 'true'sync runs only on a push to the default branch, never on an unmerged pull request.
Open versus managed
| Capability | Open Action | Polyglot Automation |
|---|---|---|
| Plans | Every plan | Team and Scale |
| Workflow ownership | Your repo owns it | Repository caller + immutable managed workflow |
| Result | Job conclusion and annotations | Native Check, run detail, policy, and history |
| Authentication | Guest or optional API key | GitHub OIDC; no project secret in the caller |
| Translation review + PR | Local/manual workflow | Opt-in sync, human review, verification, and Publisher App PR |
Learn how the managed path works in Managed Checks and Translation PRs.