@@ -2,31 +2,40 @@ name: Update Transifex Config
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Python version to update (or "all" for all versions)'
8+ required : false
9+ default : ' all'
10+ type : choice
11+ options :
12+ - all
13+ - " 3.15"
14+ - " 3.14"
15+ - " 3.13"
16+ - " 3.12"
17+ - " 3.11"
18+ - " 3.10"
19+
20+ permissions :
21+ contents : write
522
623jobs :
724 update-config :
825 runs-on : ubuntu-latest
926 strategy :
27+ fail-fast : false
1028 matrix :
11- version : ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
12- include :
13- - version : " 3.10"
14- tx_project : " python-310"
15- - version : " 3.11"
16- tx_project : " python-311"
17- - version : " 3.12"
18- tx_project : " python-312"
19- - version : " 3.13"
20- tx_project : " python-313"
21- - version : " 3.14"
22- tx_project : " python-314"
23- - version : " 3.15"
24- tx_project : " python-newest"
29+ include : ${{ fromJSON('{"all":[{"version":"3.10","tx_project":"python-310"},{"version":"3.11","tx_project":"python-311"},{"version":"3.12","tx_project":"python-312"},{"version":"3.13","tx_project":"python-313"},{"version":"3.14","tx_project":"python-314"},{"version":"3.15","tx_project":"python-newest"}],"3.10":[{"version":"3.10","tx_project":"python-310"}],"3.11":[{"version":"3.11","tx_project":"python-311"}],"3.12":[{"version":"3.12","tx_project":"python-312"}],"3.13":[{"version":"3.13","tx_project":"python-313"}],"3.14":[{"version":"3.14","tx_project":"python-314"}],"3.15":[{"version":"3.15","tx_project":"python-newest"}]}')[inputs.version || 'all'] }}
2530 steps :
31+ - name : Checkout master
32+ uses : actions/checkout@v6
33+
2634 - name : Checkout repository at version branch
2735 uses : actions/checkout@v6
2836 with :
2937 ref : ${{ matrix.version }}
38+ path : docs
3039 token : ${{ secrets.GITHUB_TOKEN }}
3140
3241 - name : Checkout CPython
@@ -43,20 +52,21 @@ jobs:
4352
4453 - name : Install Transifex CLI
4554 run : |
46- mkdir -p /tmp
4755 curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
48- sudo mv ~/bin /tx /usr/local/bin/tx
56+ sudo mv . /tx /usr/local/bin/tx
4957
5058 - name : Generate Transifex config
59+ working-directory : docs
5160 run : |
52- python .github/scripts/generate_tx_config.py \
61+ python ../. github/scripts/generate_tx_config.py \
5362 --project-name "${{ matrix.tx_project }}" \
54- --doc-path "./cpython/Doc"
63+ --doc-path ".. /cpython/Doc"
5564 env :
5665 TX_TOKEN : ${{ secrets.TRANSIFEX_APIKEY }}
5766
5867 - name : Check for changes
5968 id : check_changes
69+ working-directory : docs
6070 run : |
6171 if git diff --quiet .tx/config; then
6272 echo "has_changes=false" >> $GITHUB_OUTPUT
@@ -66,12 +76,14 @@ jobs:
6676
6777 - name : Configure git
6878 if : steps.check_changes.outputs.has_changes == 'true'
79+ working-directory : docs
6980 run : |
7081 git config user.name "github-actions[bot]"
7182 git config user.email "github-actions[bot]@users.noreply.github.com"
7283
7384 - name : Commit and push changes
7485 if : steps.check_changes.outputs.has_changes == 'true'
86+ working-directory : docs
7587 run : |
7688 git add .tx/config
7789 git commit -m "chore: update Transifex config for Python ${{ matrix.version }}"
0 commit comments