mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-23 16:28:19 +01:00
082f941bb9
transifex-client indirectly requires Unidecode>=0.04.16. As of version 1.3.2, Unidecode no longer supports Python 2. Its setup shebang points to /usr/bin/python, which it assumes is python3. To correct the issue, install pip3 instead of pip, avoiding the installation of Python 2.
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
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
|
|
python3-pip
|
|
ssh
|
|
- name: Install tx
|
|
run: pip3 install transifex-client==0.13.9
|
|
- name: Checkout
|
|
uses: actions/checkout@v1.2.0
|
|
- 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/ssh-agent@v0.4.1
|
|
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 'user.email=buildbot@clementine-player.org' commit -m 'Automatic merge of translations from Transifex' && git push 'git@github.com:clementine-player/Clementine.git' master
|