forked from clementine-player/Clementine
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 1.61 KB
/
translations.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
name: translations
on:
schedule:
- cron: '23 2 * * *'
jobs:
pull_translations:
name: Pull translations from Transifex
runs-on: ubuntu-18.04
container:
image: ubuntu:bionic
steps:
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: >
apt-get update && apt-get install -y
git
python-pip
ssh
- name: Install tx
run: pip install transifex-client==0.13.9
- name: Checkout
uses: actions/[email protected]
- name: Switch to master
run: git checkout master
- name: tx init
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx init --no-interactive --force
- name: tx config
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx config mapping --execute -r clementine.clementineplayer -s en -t PO --expression 'src/translations/<lang>.po'
- name: tx pull
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx pull --all -f --no-interactive
- name: Setup git SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.TX_KEY }}
- name: git add
run: git add src/translations/*
- name: git commit and push
env:
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
run: |
[ -z "$(git status --porcelain)" ] || git -c 'user.name=Clementine Buildbot' -c '[email protected]' commit -m 'Automatic merge of translations from Transifex' && git push '[email protected]:clementine-player/Clementine.git' master