mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Add GitHub Action to push source translation strings to Transifex
- requires TX_TOKEN secret to be set on GitHub - you can generate a token at https://www.transifex.com/user/settings/api/ - `tx push` should fail silently if this is not provided
This commit is contained in:
39
.github/workflows/transifex.yml
vendored
Normal file
39
.github/workflows/transifex.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# This workflow will push the iD source strings to transifex
|
||||
# - requires TX_TOKEN secret to be set on GitHub
|
||||
# - you can generate a token at https://www.transifex.com/user/settings/api/
|
||||
# - job should fail silently if no token provided
|
||||
|
||||
name: transifex
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
transifex:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install transifex-client
|
||||
- name: Create .transifexrc
|
||||
uses: DamianReeves/write-file-action
|
||||
with:
|
||||
path: ${{env.home}}/.transifexrc
|
||||
write-mode: overwrite
|
||||
contents: |
|
||||
[https://www.transifex.com]
|
||||
api_hostname = https://api.transifex.com
|
||||
hostname = https://www.transifex.com
|
||||
password = ${{secrets.TX_TOKEN}}
|
||||
username = api
|
||||
- name: Push source strings to Transifex
|
||||
run: tx push --source --no-interactive
|
||||
Reference in New Issue
Block a user