generated from teksi/template
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.62 KB
/
project-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
name: 🌎 Update project translations
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
paths:
- project/**
- '.github/workflows/project-translation.yml'
workflow_dispatch:
jobs:
build:
name: Update project translations
runs-on: ubuntu-24.04
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
COMPOSE_PROFILES: qgis
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Transifex
working-directory: project
run: |
curl -OL https://github.com/transifex/cli/releases/download/v1.6.10/tx-linux-amd64.tar.gz
tar -xvzf tx-linux-amd64.tar.gz
- name: Start Docker compose
run: |
docker compose up --build -d
docker compose exec db init_db.sh wait
- name: Translate (create sources)
run: docker compose run qgis sh -c 'xvfb-run /usr/src/project/scripts/project-translation-create-source.py /usr/src/project/teksi_district_heating.qgs'
- name: Push to TX
working-directory: project
run: ./tx push --source
- name: Compile Translations (fetch translated content)
working-directory: project
run: |
./tx pull -a
docker compose run qgis sh -c '/usr/src/project/scripts/project-translation-compile.sh /usr/src/project/teksi_district_heating.qgs'
- uses: actions/upload-artifact@v4
with:
name: project-translations
path: project/teksi_district_heating*
if-no-files-found: error