ResilientLang docsDeveloper documentation (draft, product name is a placeholder)

GitHub Action

A composite action (integrations/ci/github-action/action.yml) with no third-party actions inside. It is not on the Marketplace: use it from a checkout of the repository. Syntax details are verify (see the overview).

# .github/workflows/translate.yml
name: Translate
on:
  pull_request:
    paths: ['resilientlang/strings.json']
  push:
    branches: [main]
    paths: ['resilientlang/strings.json']
permissions:
  contents: read
  pull-requests: write        # only to post the preview comment
concurrency: { group: resilientlang, cancel-in-progress: false }
jobs:
  translate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4          # pin to a full commit sha in production
      # ...your step that writes resilientlang/strings.json...
      - uses: ./integrations/ci/github-action
        with:
          api-url: https://api.example.com               # your control-plane URL
          api-key: ${{ github.event_name == 'pull_request' && secrets.RL_API_KEY_READONLY || secrets.RL_API_KEY }}
          site: ${{ vars.RL_SITE }}

What it does#

Inputs#

api-url, api-key, site, strings-file (default resilientlang/strings.json; a JSON array, {"items":[]} or one string per line), languages, mode (auto, sync or preview), publish, translate, timeout, on-unavailable (fail or warn), comment, github-token, rl-cli.

Failures#

Failures become ::error annotations with a title and the fix (see Troubleshooting CI runs). A read-only GITHUB_TOKEN, as on fork pull requests, only downgrades the comment to a warning.

Keep the two-key rule: the expression above gives pull requests the read-only key and the default branch the write key. Never use pull_request_target with a checkout of the pull request's code.