kalima-sync.yml workflow
This repo provides a reusable workflow at .github/workflows/kalima-sync.yml with two jobs.
It is workflow_call only, so it does not auto-run in this repository.
Clients call it from their own repo workflows.
Push
Runs only when client workflow calls this workflow with action: push, then pushes source phrase files to Kalima.
Pull
Runs when client workflow calls this workflow with action: pull or action: auto, pulls approved translations from Kalima, and opens a PR with the changes.
Required secrets
KALIMA_PROJECT_KEYKALIMA_SYNC_SECRETKALIMA_API_URL(optional; defaults tohttps://api.kalima.digital/api/v1)
Unsigned sync and LOCALE_* fallback secrets are no longer supported.
Example (copy/paste)
jobs:
kalima-sync:
uses: bishoywadie/locale/.github/workflows/kalima-sync.yml@main
with:
action: auto
secrets:
KALIMA_PROJECT_KEY: ${{ secrets.KALIMA_PROJECT_KEY }}
KALIMA_SYNC_SECRET: ${{ secrets.KALIMA_SYNC_SECRET }}
KALIMA_API_URL: ${{ secrets.KALIMA_API_URL }}
Client trigger example (in client repo)
name: Kalima Sync
on:
push:
paths:
- '**/locales/**'
- '**/i18n/**'
- '**/translations/**'
- '**/.locale/**'
workflow_dispatch:
inputs:
action:
required: true
type: choice
options: [push, pull]
jobs:
sync:
uses: bishoywadie/locale/.github/workflows/kalima-sync.yml@main
with:
action: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.action || 'auto' }}
secrets:
KALIMA_PROJECT_KEY: ${{ secrets.KALIMA_PROJECT_KEY }}
KALIMA_SYNC_SECRET: ${{ secrets.KALIMA_SYNC_SECRET }}
KALIMA_API_URL: ${{ secrets.KALIMA_API_URL }}
For a full reference (including pull + PR creation), see .github/workflows/kalima-sync.yml.