Skip to main content

kalima-sdk-discovery.yml workflow

This is a reusable workflow at .github/workflows/kalima-sdk-discovery.yml. It is workflow_call only, so it does not auto-run in this repository. Clients call it from their own repo workflows.

What it does

  • Scans source files for phrase candidates
  • Deduplicates and filters noisy values
  • Uploads batches to POST /phrases/batch-extract
  • Produces discovery outputs and a JSON report artifact

Outputs

  • discovered_count
  • uploaded_count
  • errors_count
  • report_path

Supported controls

  • dry-run
  • fail-on-threshold
  • new-phrases-threshold
  • environment metadata (qa or prod)

Required secrets

  • KALIMA_PROJECT_KEY
  • KALIMA_API_URL (optional; defaults to https://sdk-api.kalima.digital/api/v1)

LOCALE_* fallback secrets are no longer supported.

Example reusable call (copy/paste)

jobs:
discover:
uses: bishoywadie/locale/.github/workflows/kalima-sdk-discovery.yml@main
with:
dry_run: false
environment: prod
secrets:
KALIMA_PROJECT_KEY: ${{ secrets.KALIMA_PROJECT_KEY }}
KALIMA_API_URL: ${{ secrets.KALIMA_API_URL }}

Client trigger example (in client repo)

name: Kalima SDK Discovery

on:
pull_request:
paths:
- 'src/**'
- 'app/**'
- 'pages/**'
- 'components/**'
- 'packages/**'
workflow_dispatch:
inputs:
dry_run:
type: boolean
default: false

jobs:
discover:
uses: bishoywadie/locale/.github/workflows/kalima-sdk-discovery.yml@main
with:
dry_run: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run || true }}
environment: prod
secrets:
KALIMA_PROJECT_KEY: ${{ secrets.KALIMA_PROJECT_KEY }}
KALIMA_API_URL: ${{ secrets.KALIMA_API_URL }}

For complete behavior and inputs, see .github/workflows/kalima-sdk-discovery.yml.