@@ -17,51 +17,40 @@ jobs:
1717 version : ['3.14']
1818
1919 steps :
20- # 🔁 Cancel previous runs (avoid overlap)
2120 - uses : styfle/cancel-workflow-action@0.12.1
2221 with :
2322 access_token : ${{ secrets.GITHUB_TOKEN }}
2423
25- # 🐍 Setup Python
2624 - uses : actions/setup-python@v5
2725 with :
2826 python-version : ' 3.12'
2927
30- # 📦 Install dependencies (FIXED)
28+ # 🔥 FINAL FIX USING pipx
3129 - name : Install Dependencies
3230 run : |
3331 sudo apt-get update
34- sudo apt-get install -y gettext
32+ sudo apt-get install -y gettext pipx
33+ pipx ensurepath
3534
36- python -m pip install --upgrade pip
37- python -m pip install setuptools # 🔥 FIX for pkg_resources
38- python -m pip install requests cogapp polib sphinx-intl blurb six transifex-client
35+ pipx install transifex-client
3936
40- # 🔧 Fix PATH so tx is available
41- - name : Fix PATH for tx
42- run : |
43- echo "$(python -m site --user-base)/bin" >> $GITHUB_PATH
37+ echo "$HOME/.local/bin" >> $GITHUB_PATH
4438
45- # ✅ Verify tx works (important)
46- - name : Verify tx installation
39+ - name : Verify tx
4740 run : |
48- echo "PATH=$PATH"
4941 which tx
5042 tx --version
5143
52- # 📂 Checkout your repo
5344 - uses : actions/checkout@v4
5445 with :
5546 ref : ${{ matrix.version }}
5647 fetch-depth : 0
5748
58- # 📥 Download official helper script
59- - name : Download transifex util
49+ - name : Download util
6050 run : |
6151 curl -O https://raw.githubusercontent.com/python-docs-translations/transifex-automations/master/sample-workflows/transifex-util.py
6252 chmod +x transifex-util.py
6353
64- # ⚙️ Create Transifex config
6554 - name : Configure Transifex
6655 run : |
6756 ./transifex-util.py recreate_tx_config \
7160 env :
7261 TX_TOKEN : ${{ secrets.TX_TOKEN }}
7362
74- # ⬇️ Fetch translations
7563 - name : Fetch translations
7664 run : |
7765 ./transifex-util.py fetch \
@@ -81,22 +69,19 @@ jobs:
8169 env :
8270 TX_TOKEN : ${{ secrets.TX_TOKEN }}
8371
84- # 🧹 Remove obsolete files
8572 - name : Cleanup obsolete files
8673 run : |
8774 ./transifex-util.py delete_obsolete_files \
8875 --language ta \
8976 --project-slug python-newest \
9077 --version ${{ matrix.version }}
9178
92- # 🧾 Setup Git
9379 - name : Setup Git
9480 run : |
9581 git config --local user.email "github-actions@github.com"
9682 git config --local user.name "Transifex Bot"
9783
98- # 🔍 Detect meaningful changes only
99- - name : Check for changes
84+ - name : Check changes
10085 run : |
10186 if ! git diff -I'^"POT-Creation-Date: ' \
10287 -I'^"Language-Team: ' \
@@ -106,14 +91,12 @@ jobs:
10691 echo "SIGNIFICANT_CHANGES=1" >> $GITHUB_ENV
10792 fi
10893
109- # 💾 Commit changes
110- - name : Commit changes
94+ - name : Commit
11195 if : env.SIGNIFICANT_CHANGES
11296 run : |
11397 git add . ':!transifex-util.py'
11498 git commit -m "Update Tamil translations from Transifex"
11599
116- # 🚀 Push changes
117100 - uses : ad-m/github-push-action@v0.8.0
118101 if : env.SIGNIFICANT_CHANGES
119102 with :
0 commit comments