Migrate `tx pull` to new CLI

This commit is contained in:
John Maguire 2023-07-10 18:34:22 +01:00
parent 58325e45a7
commit ab057f8275
1 changed files with 9 additions and 7 deletions

View File

@ -8,18 +8,20 @@ jobs:
name: Pull translations from Transifex name: Pull translations from Transifex
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
container: container:
image: ubuntu:bionic image: ubuntu:jammy
steps: steps:
- uses: supplypike/setup-bin@v3
with:
uri: https://github.com/transifex/cli/releases/download/v1.6.7/tx-linux-amd64.tar.gz
name: tx
version: 1.6.7
- name: Install dependencies - name: Install dependencies
env: env:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
run: > run: >
apt-get update && apt-get install -y apt-get update && apt-get install -y
git git
python3-pip
ssh ssh
- name: Install tx
run: pip3 install transifex-client==0.13.9
- name: Checkout - name: Checkout
uses: actions/checkout@v1.2.0 uses: actions/checkout@v1.2.0
- name: git hackery - name: git hackery
@ -29,15 +31,15 @@ jobs:
- name: tx init - name: tx init
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx init --no-interactive --force run: tx init
- name: tx config - name: tx config
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx config mapping --execute -r clementine.clementineplayer -s en -t PO --expression 'src/translations/<lang>.po' run: tx add --organization davidsansome --project clementine --resource clementineplayer --file-filter 'src/translations/<lang>.po' --type PO src/translations/en.po
- name: tx pull - name: tx pull
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx pull --all -f --no-interactive run: tx pull -f -a
- name: Setup git SSH - name: Setup git SSH
uses: webfactory/ssh-agent@v0.4.1 uses: webfactory/ssh-agent@v0.4.1
with: with: