Skip to content

Handle translations

Handle translations #1

name: Handle translations
on:
workflow_dispatch:
inputs:
branch:
description: Branch to handle translations for.
required: false
default: main
jobs:
handle_translations:
runs-on: ubuntu-latest
steps:
- name: Get GitHub token for c8y-i18n-automations app
id: i18n-automations-token
uses: Cumulocity-IoT/github-app-token@v3
with:
app_id: ${{ vars.C8Y_I18N_APP_ID }}
installation_id: ${{ vars.C8Y_I18N_INSTALLATION_ID }}
private_key: ${{ secrets.C8Y_I18N_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
token: ${{ steps.i18n-automations-token.outputs.token }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Extract source files
run: ng extract-i18n
- name: Run i18n-automation action
id: i18n-automation
uses: Cumulocity-IoT/i18n-automation@main
env:
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
DEEPL_API_KEY: ${{ secrets.DEEPL_API_KEY }}
GITHUB_TOKEN: ${{ steps.i18n-automations-token.outputs.token }}