Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b887cc

Browse files
author
Maciej Olko
committed
Merge build jobs using configuration matrix
1 parent 7ba9175 commit 2b887cc

1 file changed

Lines changed: 7 additions & 29 deletions

File tree

.github/workflows/update-and-build.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,18 @@ on:
55
branches:
66
- '*'
77
jobs:
8-
update-translation-newest:
8+
update-translation:
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
version: [3.8, 3.9]
1013
steps:
1114
- uses: actions/setup-python@master
1215
- run: sudo apt-get install -y gettext
1316
- run: pip install transifex-client requests
1417
- uses: actions/checkout@master
1518
with:
16-
ref: 3.9
17-
- run: echo -e '[https://www.transifex.com]\napi_hostname = https://api.transifex.com\nhostname = https://www.transifex.com\nusername = api' > $HOME/.transifexrc
18-
- run: ./manage_translation.py fetch
19-
env:
20-
TX_TOKEN: ${{ secrets.TX_TOKEN }}
21-
- run: ./manage_translation.py recreate_readme
22-
env:
23-
TX_TOKEN: ${{ secrets.TX_TOKEN }}
24-
- run: git config --local user.email '[email protected]'
25-
name: Run git config --local user.email '…'
26-
- run: git config --local user.name "GitHub Action's update-translation job"
27-
- run: git add .
28-
- run: git commit -m 'Update translation from Transifex' || true
29-
- uses: ad-m/github-push-action@master
30-
with:
31-
branch: 3.9
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
update-translation-38:
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/setup-python@master
37-
- run: sudo apt-get install -y gettext
38-
- run: pip install transifex-client requests
39-
- uses: actions/checkout@master
40-
with:
41-
ref: 3.8
19+
ref: ${{ matrix.version }}
4220
- run: echo -e '[https://www.transifex.com]\napi_hostname = https://api.transifex.com\nhostname = https://www.transifex.com\nusername = api' > $HOME/.transifexrc
4321
- run: ./manage_translation.py fetch
4422
env:
@@ -53,11 +31,11 @@ jobs:
5331
- run: git commit -m 'Update translation from Transifex' || true
5432
- uses: ad-m/github-push-action@master
5533
with:
56-
branch: 3.8
34+
branch: ${{ matrix.version }}
5735
github_token: ${{ secrets.GITHUB_TOKEN }}
5836
build-translation:
5937
runs-on: ubuntu-latest
60-
needs: ['update-translation-newest']
38+
needs: ['update-translation']
6139
steps:
6240
- uses: actions/setup-python@master
6341
- uses: actions/checkout@master

0 commit comments

Comments
 (0)