-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.1 KB
/
tx_pull.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
name: Pull strings from transifex
on:
schedule:
# 7:45 every day
- cron: '45 7 * * *'
push:
branches:
- main
# Allow one concurrent deployment
concurrency:
group: "tx_pull"
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install deps
run: |
pip install transifex-client
- name: Create .tx/config
run: |
mkdir -p .tx
curl https://raw.githubusercontent.com/qgis/QGIS-Website/master/.tx/config -o .tx/config
- name: Pull translations
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: |
tx pull -a -f
- name: Push repository
run: |
git config --global user.name 'Transifex update'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git status
git add .
git commit -m "Automated update"
git push