@@ -17,40 +17,45 @@ jobs:
1717 version : ['3.14']
1818
1919 steps :
20+ # Cancel previous runs
2021 - uses : styfle/cancel-workflow-action@0.12.1
2122 with :
2223 access_token : ${{ secrets.GITHUB_TOKEN }}
2324
25+ # 🔥 USE PYTHON 3.10 (CRITICAL FIX)
2426 - uses : actions/setup-python@v5
2527 with :
26- python-version : ' 3.12 '
28+ python-version : ' 3.10 '
2729
28- # 🔥 FINAL FIX USING pipx
30+ # Install dependencies
2931 - name : Install Dependencies
3032 run : |
3133 sudo apt-get update
32- sudo apt-get install -y gettext pipx
33- pipx ensurepath
34+ sudo apt-get install -y gettext
3435
35- pipx install transifex-client
36-
37- echo "$HOME/.local/bin" >> $GITHUB_PATH
36+ python -m pip install --upgrade pip
37+ python -m pip install setuptools
38+ python -m pip install requests cogapp polib sphinx-intl blurb six transifex-client
3839
40+ # Verify tx
3941 - name : Verify tx
4042 run : |
4143 which tx
4244 tx --version
4345
46+ # Checkout repo
4447 - uses : actions/checkout@v4
4548 with :
4649 ref : ${{ matrix.version }}
4750 fetch-depth : 0
4851
52+ # Download helper script
4953 - name : Download util
5054 run : |
5155 curl -O https://raw.githubusercontent.com/python-docs-translations/transifex-automations/master/sample-workflows/transifex-util.py
5256 chmod +x transifex-util.py
5357
58+ # Configure Transifex
5459 - name : Configure Transifex
5560 run : |
5661 ./transifex-util.py recreate_tx_config \
6065 env :
6166 TX_TOKEN : ${{ secrets.TX_TOKEN }}
6267
68+ # Fetch translations
6369 - name : Fetch translations
6470 run : |
6571 ./transifex-util.py fetch \
@@ -69,18 +75,21 @@ jobs:
6975 env :
7076 TX_TOKEN : ${{ secrets.TX_TOKEN }}
7177
78+ # Cleanup
7279 - name : Cleanup obsolete files
7380 run : |
7481 ./transifex-util.py delete_obsolete_files \
7582 --language ta \
7683 --project-slug python-newest \
7784 --version ${{ matrix.version }}
7885
86+ # Setup Git
7987 - name : Setup Git
8088 run : |
8189 git config --local user.email "github-actions@github.com"
8290 git config --local user.name "Transifex Bot"
8391
92+ # Detect changes
8493 - name : Check changes
8594 run : |
8695 if ! git diff -I'^"POT-Creation-Date: ' \
@@ -91,12 +100,14 @@ jobs:
91100 echo "SIGNIFICANT_CHANGES=1" >> $GITHUB_ENV
92101 fi
93102
103+ # Commit
94104 - name : Commit
95105 if : env.SIGNIFICANT_CHANGES
96106 run : |
97107 git add . ':!transifex-util.py'
98108 git commit -m "Update Tamil translations from Transifex"
99109
110+ # Push
100111 - uses : ad-m/github-push-action@v0.8.0
101112 if : env.SIGNIFICANT_CHANGES
102113 with :
0 commit comments