@@ -22,39 +22,45 @@ jobs:
22
22
- uses : actions/setup-python@master
23
23
with :
24
24
python-version : 3
25
- - run : sudo apt-get install -y gettext
26
- - run : pip install requests cogapp polib transifex-python sphinx-intl blurb six
27
- - run : curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
25
+ - name : Install Dependencies
26
+ run : |
27
+ sudo apt-get install -y gettext
28
+ pip install requests cogapp polib transifex-python sphinx-intl blurb six
29
+ curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
28
30
working-directory : /usr/local/bin
29
31
- uses : actions/checkout@master
30
32
with :
31
33
ref : ${{ matrix.version }}
32
34
fetch-depth : 0
33
- - run : ./manage_translation.py recreate_tx_config
35
+ - name : Recreate Transifex config
36
+ run : ./manage_translation.py recreate_tx_config
34
37
env :
35
38
TX_TOKEN : ${{ secrets.TX_TOKEN }}
36
- - run : ./manage_translation.py fetch
39
+ - name : Fetch translations
40
+ run : ./manage_translation.py fetch
37
41
env :
38
42
TX_TOKEN : ${{ secrets.TX_TOKEN }}
39
- # Process README.md
40
- - run : python -Werror -m cogapp -rP README.md
41
- if : ${{ hashFiles('README.md') != '' }}
43
+ - name : Update README.md
44
+ run : python -Werror -m cogapp -rP README.md
42
45
env :
43
46
TX_TOKEN : ${{ secrets.TX_TOKEN }}
44
- # Process README.en.md
45
- - run : python -Werror -m cogapp -rP README.en.md
47
+ - name : Update README.en.md
48
+ run : python -Werror -m cogapp -rP README.en.md
46
49
if : ${{ hashFiles('README.en.md') != '' }}
47
50
env :
48
51
TX_TOKEN : ${{ secrets.TX_TOKEN }}
49
52
-
run :
git config --local user.email [email protected]
50
53
- run : git config --local user.name "GitHub Action's update-translation job"
51
- # Check for changes in README.md
52
- - run : >
54
+ - name : Check for changes in README.md
55
+ run : >
53
56
! git diff -I'^"POT-Creation-Date: ' -I'^"Language-Team: ' -I'^# ' -I'^"Last-Translator: ' --exit-code && echo "SIGNIFICANT_CHANGES=1" >> $GITHUB_ENV || exit 0
54
- - run : git add .
55
- - run : git commit -m 'Update translation from Transifex'
57
+ - name : Commit changes
58
+ run : |
59
+ git add .
60
+ git commit -m 'Update translation from Transifex'
56
61
if : env.SIGNIFICANT_CHANGES
57
- - uses : ad-m/github-push-action@master
62
+ - name : Push commit
63
+ uses : ad-m/github-push-action@master
58
64
if : env.SIGNIFICANT_CHANGES
59
65
with :
60
66
branch : ${{ matrix.version }}
0 commit comments