File tree 11 files changed +79
-127
lines changed 11 files changed +79
-127
lines changed Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ error() {
13
13
cd cpython/Doc || exit 1
14
14
mkdir -p locales/" $LOCALE " /
15
15
ln -sfn " $( realpath ../../docs) " locales/" $LOCALE " /LC_MESSAGES
16
- make venv
17
- make html SPHINXOPTS=" -D language=$LOCALE -D gettext_compact=0 -W --keep-going -j2 " 2> >( error)
16
+ pip3 install -q -r requirements.txt
17
+ make html SPHINXOPTS=" -D language=$LOCALE -D gettext_compact=0 -W --keep-going" 2> >( error)
Original file line number Diff line number Diff line change @@ -11,5 +11,4 @@ if ! git status -s|grep '\.po'; then
11
11
fi
12
12
git add .
13
13
git commit -m ' [po] auto sync'
14
- header=" $( echo -n token:" $GITHUB_TOKEN " | base64) "
15
- git -c http.extraheader=" AUTHORIZATION: basic $header " push
14
+ git push
Original file line number Diff line number Diff line change 2
2
3
3
set -ex
4
4
5
- git clone --depth=1 --branch=" $VERSION " https://github.com/python/cpython cpython
6
- git clone --branch=" $VERSION " https://github.com/" $GITHUB_REPOSITORY " docs
7
-
8
- pip3 install --user setuptools
9
- curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
10
- sudo apt-get update
11
- sudo apt-get install -y python3-venv
5
+ curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- tx=$( realpath ./tx)
4
3
cd docs || exit 1
5
- $tx pull --languages " $LOCALE " -t --use-git-timestamps
4
+ $( realpath ../tx ) pull --languages " $LOCALE " -t --use-git-timestamps --workers 25 --silent
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- master
7
7
schedule :
8
- - cron : " 8 * * * *"
8
+ - cron : " 26 * * * *"
9
9
10
10
jobs :
11
11
sync :
12
- runs-on : ubuntu-latest
13
- env :
14
- LOCALE : zh_CN
15
- VERSION : " 3.10"
16
- steps :
17
- - uses : actions/checkout@v2
18
- - name : prepare
19
- run : .github/scripts/prepare.sh
20
- - name : update
21
- run : .github/scripts/update.sh
22
- env :
23
- TX_TOKEN : ${{ secrets.TRANSIFEX_APIKEY }}
24
- - name : build
25
- run : .github/scripts/build.sh
26
- - name : commit
27
- run : .github/scripts/commit.sh
28
- env :
29
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12
+ uses : ./.github/workflows/sync.yml
13
+ with :
14
+ version : " 3.10"
15
+ secrets : inherit
16
+
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- master
7
7
schedule :
8
- - cron : " 11 * * * *"
8
+ - cron : " 38 * * * *"
9
9
10
10
jobs :
11
11
sync :
12
- runs-on : ubuntu-latest
13
- env :
14
- LOCALE : zh_CN
15
- VERSION : " 3.11"
16
- steps :
17
- - uses : actions/checkout@v2
18
- - name : prepare
19
- run : .github/scripts/prepare.sh
20
- - name : update
21
- run : .github/scripts/update.sh
22
- env :
23
- TX_TOKEN : ${{ secrets.TRANSIFEX_APIKEY }}
24
- - name : build
25
- run : .github/scripts/build.sh
26
- - name : commit
27
- run : .github/scripts/commit.sh
28
- env :
29
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12
+ uses : ./.github/workflows/sync.yml
13
+ with :
14
+ version : " 3.11"
15
+ secrets : inherit
16
+
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- master
7
7
schedule :
8
- - cron : " 42 * * * *"
8
+ - cron : " 50 * * * *"
9
9
10
10
jobs :
11
11
sync :
12
- runs-on : ubuntu-latest
13
- env :
14
- LOCALE : zh_CN
15
- VERSION : " 3.12"
16
- steps :
17
- - uses : actions/checkout@v2
18
- - name : prepare
19
- run : .github/scripts/prepare.sh
20
- - name : update
21
- run : .github/scripts/update.sh
22
- env :
23
- TX_TOKEN : ${{ secrets.TRANSIFEX_APIKEY }}
24
- - name : build
25
- run : .github/scripts/build.sh
26
- - name : commit
27
- run : .github/scripts/commit.sh
28
- env :
29
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12
+ uses : ./.github/workflows/sync.yml
13
+ with :
14
+ version : " 3.12"
15
+ secrets : inherit
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- master
7
7
schedule :
8
- - cron : " 53 * * * *"
8
+ - cron : " 0 * * * *"
9
9
10
10
jobs :
11
11
sync :
12
- runs-on : ubuntu-latest
13
- env :
14
- LOCALE : zh_CN
15
- VERSION : " 3.7"
16
- steps :
17
- - uses : actions/checkout@v2
18
- - name : prepare
19
- run : .github/scripts/prepare.sh
20
- - name : update
21
- run : .github/scripts/update.sh
22
- env :
23
- TX_TOKEN : ${{ secrets.TRANSIFEX_APIKEY }}
24
- - name : build
25
- run : .github/scripts/build.sh
26
- - name : commit
27
- run : .github/scripts/commit.sh
28
- env :
29
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12
+ uses : ./.github/workflows/sync.yml
13
+ with :
14
+ version : " 3.7"
15
+ secrets : inherit
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- master
7
7
schedule :
8
- - cron : " 38 * * * *"
8
+ - cron : " 2 * * * *"
9
9
10
10
jobs :
11
11
sync :
12
- runs-on : ubuntu-latest
13
- env :
14
- LOCALE : zh_CN
15
- VERSION : " 3.8"
16
- steps :
17
- - uses : actions/checkout@v2
18
- - name : prepare
19
- run : .github/scripts/prepare.sh
20
- - name : update
21
- run : .github/scripts/update.sh
22
- env :
23
- TX_TOKEN : ${{ secrets.TRANSIFEX_APIKEY }}
24
- - name : build
25
- run : .github/scripts/build.sh
26
- - name : commit
27
- run : .github/scripts/commit.sh
28
- env :
29
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12
+ uses : ./.github/workflows/sync.yml
13
+ with :
14
+ version : " 3.8"
15
+ secrets : inherit
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- master
7
7
schedule :
8
- - cron : " 23 * * * *"
8
+ - cron : " 14 * * * *"
9
9
10
10
jobs :
11
11
sync :
12
- runs-on : ubuntu-latest
13
- env :
14
- LOCALE : zh_CN
15
- VERSION : " 3.9"
16
- steps :
17
- - uses : actions/checkout@v2
18
- - name : prepare
19
- run : .github/scripts/prepare.sh
20
- - name : update
21
- run : .github/scripts/update.sh
22
- env :
23
- TX_TOKEN : ${{ secrets.TRANSIFEX_APIKEY }}
24
- - name : build
25
- run : .github/scripts/build.sh
26
- - name : commit
27
- run : .github/scripts/commit.sh
28
- env :
29
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12
+ uses : ./.github/workflows/sync.yml
13
+ with :
14
+ version : " 3.9"
15
+ secrets : inherit
16
+
Original file line number Diff line number Diff line change
1
+ name : Reusable workflow example
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ version :
7
+ required : true
8
+ type : string
9
+ secrets :
10
+ TRANSIFEX_APIKEY :
11
+ required : true
12
+
13
+ jobs :
14
+ sync :
15
+ runs-on : ubuntu-latest
16
+ env :
17
+ LOCALE : zh_CN
18
+ VERSION : ${{ inputs.version }}
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ - name : Checkout CPython
22
+ uses : actions/checkout@v3
23
+ with :
24
+ repository : ' python/cpython'
25
+ ref : ${{env.VERSION}}
26
+ path : cpython
27
+ - name : Checkout Current Branch
28
+ uses : actions/checkout@v3
29
+ with :
30
+ ref : ${{env.VERSION}}
31
+ path : docs
32
+ - name : prepare
33
+ run : .github/scripts/prepare.sh
34
+ - name : update
35
+ run : .github/scripts/update.sh
36
+ env :
37
+ TX_TOKEN : ${{ secrets.TRANSIFEX_APIKEY }}
38
+ - name : build
39
+ run : .github/scripts/build.sh
40
+ - name : commit
41
+ run : .github/scripts/commit.sh
You can’t perform that action at this time.
0 commit comments