-
Notifications
You must be signed in to change notification settings - Fork 15
40 lines (36 loc) · 1.26 KB
/
translations-sync.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
name: 🌍 Translations - Sync
on:
schedule:
- cron: "5 1 * * *"
workflow_dispatch:
jobs:
sync_translations:
runs-on: ubuntu-latest
steps:
# use a specific user rather than standard bot to be able to bypass protection rule
# https://github.com/orgs/community/discussions/13836
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_GEONINJA_TOKEN }}
- name: Install Requirements
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qttools5-dev-tools
# v1.6.5: 2023-02-16
curl -OL https://github.com/transifex/cli/releases/download/v1.6.5/tx-linux-amd64.tar.gz
tar -xvzf tx-linux-amd64.tar.gz
- name: 🌍 Pull Translations
shell: bash
run: |
TX_TOKEN=${{ secrets.TX_TOKEN }} ./tx pull -a --force
- name: Commit
run: |
git config --global user.name "Geo Ninja"
git config --global user.email "${{ secrets.GH_GEONINJA_EMAIL }}"
git add i18n
for PLUGIN in about gpkg print ephem
do
git add share/python/plugins/kadas_${PLUGIN}/i18n
done
git commit -m "Synchronize translations" || echo "no changes to translations"
git push