-
-
Notifications
You must be signed in to change notification settings - Fork 98
78 lines (69 loc) · 2.28 KB
/
update-tx-config.yml
File metadata and controls
78 lines (69 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Update Transifex Config
on:
workflow_dispatch:
jobs:
update-config:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
include:
- 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"
steps:
- name: Checkout repository at version branch
uses: actions/checkout@v6
with:
ref: ${{ matrix.version }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout CPython
uses: actions/checkout@v6
with:
repository: 'python/cpython'
ref: ${{ matrix.version }}
path: cpython
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install Transifex CLI
run: |
mkdir -p /tmp
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
sudo mv ~/bin/tx /usr/local/bin/tx
- name: Generate Transifex config
run: |
python .github/scripts/generate_tx_config.py \
--project-name "${{ matrix.tx_project }}" \
--doc-path "./cpython/Doc"
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_APIKEY }}
- name: Check for changes
id: check_changes
run: |
if git diff --quiet .tx/config; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Configure git
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git add .tx/config
git commit -m "chore: update Transifex config for Python ${{ matrix.version }}"
git push