Skip to content

Crowdin Synchronize Action #113

Crowdin Synchronize Action

Crowdin Synchronize Action #113

name: Crowdin Synchronize Action
on:
push:
paths:
- 'app/src/main/res/values/strings.xml'
- 'app/src/main/res/values/languages.xml'
branches: [ main ]
schedule:
- cron: '0 1 * * 0'
workflow_dispatch:
jobs:
crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
cd script/crowdin
pip install -r requirements.txt
- name: Get Crowdin project progress
run: |
cd script/crowdin
python start.py ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Synchronize with Crowdin
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: false
download_translations: true
create_pull_request: true
localization_branch_name: l10n_crowdin_translations
pull_request_title: 'New Crowdin translations'
pull_request_base_branch_name: 'main'
pull_request_labels: 'translations, enhancement'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}