|
1 |
| -name:"Wrapall po files in branch" |
| 1 | +name:"WrapAll" |
2 | 2 |
|
3 |
| -on:workflow_dispatch |
| 3 | +on: |
| 4 | +workflow_dispatch: |
| 5 | +schedule: |
| 6 | + -cron:'0 0 15 * *' |
4 | 7 |
|
5 | 8 | jobs:
|
6 | 9 | wrap:
|
7 | 10 | runs-on:ubuntu-latest
|
8 | 11 | steps:
|
9 |
| -# Checkout the latest code from the repo |
10 | 12 | -name:Checkout repo
|
11 | 13 | uses:actions/checkout@v3
|
12 | 14 |
|
13 |
| -# Setup which version of Python to use |
14 |
| - -name:Set Up Python 3.10 |
| 15 | + -name:Set Up Python 3.11 |
15 | 16 | uses:actions/setup-python@v4
|
16 | 17 | with:
|
17 |
| -python-version:"3.10" |
| 18 | +python-version:"3.11" |
18 | 19 |
|
19 |
| -#Update pip |
20 |
| - -name:Update pip |
| 20 | +#Upgrade pip |
| 21 | + -name:Upgrade pip |
21 | 22 | run:python -m pip install --upgrade pip
|
22 | 23 |
|
23 |
| -# Install requirements. |
24 |
| - -name:Install requirements |
25 |
| -run:python -m pip install --upgrade -r requirements.txt |
26 |
| - |
27 | 24 | # Install dependencies
|
28 | 25 | -name:Install dependencies
|
29 |
| -run:sudo apt install -y gettext |
| 26 | +run:python -m pip install --upgrade -r requirements.txt &&sudo apt install -y gettext |
30 | 27 |
|
31 | 28 | # Wrap all po files
|
32 | 29 | -name:Wrap
|
33 | 30 | run:powrap *.po */*.po
|
34 | 31 |
|
35 |
| - -name:Sphinx lint |
36 |
| -run:| |
37 |
| - sphinx-lint *.po */*.po |
38 |
| -
|
39 |
| -# Detect changed files |
40 |
| - -name:Detect changed files |
41 |
| -run:echo "WRAPPED=$(git diff --name-only | tr '\n' ' ')" >> $GITHUB_ENV |
42 |
| - |
43 |
| -# Commit changes |
44 |
| - -name:Commit changes |
45 |
| -run:| |
46 |
| - array=($WRAPPED) |
47 |
| - len=${#array[@]} |
48 |
| - if [[ $len -eq 0 ]]; then |
49 |
| - echo "No files to commit" |
50 |
| - echo "WRAPPED=False" >> $GITHUB_ENV |
51 |
| - else |
52 |
| - echo "Committing changes" |
53 |
| - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" |
54 |
| - git config --local user.name "github-actions[bot]" |
55 |
| - git add ${WRAPPED} |
56 |
| - git commit -m "Wrap translations" |
57 |
| - echo "WRAPPED=True" >> $GITHUB_ENV |
58 |
| - fi |
59 |
| -
|
60 | 32 | # Create pull request
|
61 | 33 | -name:Create Pull Request
|
62 |
| -id:cpr |
63 |
| -uses:peter-evans/create-pull-request@v4 |
| 34 | +uses:peter-evans/create-pull-request@v4.2.3 |
64 | 35 | with:
|
65 |
| -token:${{ secrets.GITHUB_TOKEN }} |
66 |
| -commit-message:Update report |
67 |
| -committer:GitHub <noreply@github.com> |
68 |
| -author:${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> |
69 |
| -signoff:false |
70 |
| -branch:${{ github.ref_name }}_wrapped |
| 36 | +commit-message:'Wrap all files on: ${{ github.ref_name }}' |
| 37 | +branch:${{ github.ref_name }}-wrapped |
71 | 38 | delete-branch:true
|
| 39 | +committer:github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
| 40 | +author:github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
72 | 41 | title:'Wrap branch: ${{ github.ref_name }}'
|
73 |
| -body:Wrapped alltranslations on branch ${{ github.ref_name }}. |
| 42 | +body:'Wrapped allfiles on branch: ${{ github.ref_name }}.' |
74 | 43 | labels:wrap
|
75 |
| -draft:false |
| 44 | +reviewers:| |
| 45 | + egeakman |
| 46 | + ardasak |