Skip to content

Commit 4ea9895

Browse files
author
Maciej Olko
committed
Add job for updating 3.8 translation to workflow
(cherry picked from commit 4719b44)
1 parent 4335040 commit 4ea9895

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/update-and-build.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- '*'
77
jobs:
8-
update-translation:
8+
update-translation-newest:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/setup-python@master
@@ -30,9 +30,34 @@ jobs:
3030
with:
3131
branch: 3.9
3232
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
update-translation-38:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/setup-python@master
37+
- run: sudo apt-get install -y gettext
38+
- run: pip install transifex-client requests
39+
- uses: actions/checkout@master
40+
with:
41+
ref: 3.8
42+
- run: echo -e '[https://www.transifex.com]\napi_hostname = https://api.transifex.com\nhostname = https://www.transifex.com\nusername = api' > $HOME/.transifexrc
43+
- run: ./manage_translation.py fetch
44+
env:
45+
TX_TOKEN: ${{ secrets.TX_TOKEN }}
46+
- run: ./manage_translation.py recreate_readme
47+
env:
48+
TX_TOKEN: ${{ secrets.TX_TOKEN }}
49+
- run: git config --local user.email 'maciej.olko@gmail.com'
50+
name: Run git config --local user.email '…'
51+
- run: git config --local user.name "GitHub Action's update-translation job"
52+
- run: git add .
53+
- run: git commit -m 'Update translation from Transifex' || true
54+
- uses: ad-m/github-push-action@master
55+
with:
56+
branch: 3.8
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
3358
build-translation:
3459
runs-on: ubuntu-latest
35-
needs: ['update-translation']
60+
needs: ['update-translation-newest']
3661
steps:
3762
- uses: actions/setup-python@master
3863
- uses: actions/checkout@master

0 commit comments

Comments
 (0)