-
Notifications
You must be signed in to change notification settings - Fork 29
64 lines (52 loc) · 1.68 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
54
55
56
57
58
59
60
61
62
63
64
name: Pull translations
on:
workflow_dispatch:
branches:
- '!master'
jobs:
pull-translations:
runs-on: ubuntu-latest
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 tarantool
uses: tarantool/setup-tarantool@v3
with:
tarantool-version: '2.6'
- 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 rst/requirements.txt
- name: Create Makefile
run: cmake .
- name: Update pot files
run: make update-pot
- name: Pull translations from Crowdin
uses: crowdin/[email protected]
with:
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 rst/locale/ru/LC_MESSAGES
make cleanup-po
- name: Commit translation files
uses: stefanzweifel/[email protected]
with:
commit_message: "Update translations"
file_pattern: "*.po"