Chmod +x #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-latest | |
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 |