Check every locale file on every pull request, with inline annotations. No API key.
# .github/workflows/i18n.yml
uses: Shipi18n/shipi18n-github-action@v3Check mode needs nothing configured beyond the locale path. Give the job security-events: write so the SARIF upload can annotate the PR. Translate mode additionally needs your key as a repository secret and contents: write (or pull-requests: write to open a PR).
uses: Shipi18n/shipi18n-github-action@v3name: i18n check
on: [pull_request]
permissions:
contents: read
security-events: write
jobs:
i18n:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Shipi18n/shipi18n-github-action@v3
with:
locales: ./locales
severity: 'missing-key=off,untranslated=off,orphan-key=off'
- uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: shipi18n.sarif - uses: Shipi18n/shipi18n-github-action@v3
with:
locales: ./locales
baseline: .shipi18n/baseline.json # npx @shipi18n/cli check ./locales --write-baseline - uses: Shipi18n/shipi18n-github-action@v3
with:
mode: translate
source-file: locales/en.json
target-languages: es,fr,de
api-key: ${{ secrets.ANTHROPIC_API_KEY }}
create-pr: 'true'
skip-paths: 'legal.*,brand.*' # globs; skip-keys takes exact pathsTranslations that haven't arrived yet: add severity: 'missing-key=off,untranslated=off,orphan-key=off', or record a baseline.
Add the github/codeql-action/upload-sarif step with if: always(), and give the job security-events: write.
Pass api-key from a repository secret, or set ANTHROPIC_API_KEY in the job env. Check mode never needs one.
Need help? Read the docs