-
Notifications
You must be signed in to change notification settings - Fork 23
53 lines (45 loc) · 1.48 KB
/
pull-translation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Pull translations
on:
workflow_dispatch:
branches:
- '!master'
jobs:
pull-translations:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
token: ${{secrets.PRIVATE_REPO_ACCESS_TOKEN}}
- name: Set branch name from source branch
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Setup Python environment
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Setup Python requirements
run: |
python -m pip install --upgrade pip
pip install -r doc/requirements.txt
- name: Pull translations from Crowdin
uses: crowdin/[email protected]
with:
config: 'doc/crowdin.yaml'
upload_sources: false
upload_translations: false
push_translations: false
download_translations: true
download_language: 'ru'
crowdin_branch_name: ${{env.BRANCH_NAME}}
debug_mode: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
CROWDIN_PERSONAL_TOKEN: ${{secrets.CROWDIN_PERSONAL_TOKEN}}
- name: Cleanup translation files
run: |
sudo chown -R runner:docker doc/locale/ru/LC_MESSAGES
python doc/cleanup.py po
- name: Commit translation files
uses: stefanzweifel/[email protected]
with:
commit_message: "Update translations"
file_pattern: "*.po"