1
- name : Multilingual Docs Download
1
+ name : " Multilingual Docs Download"
2
2
3
3
on :
4
4
workflow_dispatch :
5
5
6
+ permissions : write-all
7
+
6
8
jobs :
7
9
download :
8
- permissions : write-all
9
10
name : " Download localizations from Crowdin"
10
11
runs-on : ubuntu-latest
11
12
outputs :
12
13
pr_ref : ${{ steps.convert_outputs.outputs.pr_ref }}
13
14
pr_id : ${{ steps.convert_outputs.outputs.pr_id }}
14
15
steps :
15
- - name : Checkout Repository
16
+ - name : " Checkout Repository"
16
17
uses : actions/checkout@v4
17
18
with :
18
19
fetch-tags : true
34
35
working-directory : ./docs
35
36
- name : " Build locales"
36
37
run :
37
- sphinx-intl update -p ./build/locales -l ja -l de -l ja -l fr -l it -l en -l
38
- hi -l ko -l pt_BR -l es -l zh_CN -l ru
38
+ sphinx-intl update -p ./build/locales -l ja -l de -l ja -l fr -l it -l en -l hi -l ko -l pt_BR -l es -l zh_CN -l ru
39
39
working-directory : ./docs
40
40
- name : " Crowdin"
41
41
id : crowdin
48
48
localization_branch_name : l10n_master
49
49
create_pull_request : true
50
50
pull_request_title : " docs: Update localizations from Crowdin"
51
- pull_request_body :
52
- " Crowdin download was triggered due to completely translated file or
53
- project. Starting sync. CC @Lulalaby"
51
+ pull_request_body : " Crowdin download was triggered due to completely translated file or project. Starting sync. CC @Lulalaby"
54
52
pull_request_base_branch_name : " master"
55
53
pull_request_reviewers : " Lulalaby"
56
54
config : " crowdin.yml"
@@ -69,14 +67,13 @@ jobs:
69
67
echo "pr_id=$(echo -n "$PR_ID" | base64)" >> $GITHUB_OUTPUT
70
68
71
69
pr :
72
- permissions : write-all
73
70
name : " PR operations"
74
71
needs : [download]
75
72
runs-on : ubuntu-latest
76
73
steps :
77
- - name : Checkout Repository
74
+ - name : " Checkout Repository"
78
75
uses : actions/checkout@v4
79
- - name : Refresh Pull
76
+ - name : " Refresh Pull"
80
77
run : |
81
78
git fetch --all
82
79
git reset --hard origin/master
@@ -123,11 +120,14 @@ jobs:
123
120
# with:
124
121
# workflow: version-updates.yml
125
122
# ref: ${{ steps.convert_outputs.outputs.pr_ref }}
126
- - run : gh pr merge --auto --squash $PR_ID
123
+ - name : " Auto Approve"
124
+ run : gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID"
127
125
env :
128
126
PR_ID : ${{ steps.convert_outputs.outputs.pr_id }}
129
- GITHUB_TOKEN : ${{ secrets.CI_TOKEN }}
130
- - run : gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID"
127
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
128
+ - name : " Enable Auto Merge"
129
+ if : ${{ always() }}
130
+ run : gh pr merge --auto --squash $PR_ID
131
131
env :
132
132
PR_ID : ${{ steps.convert_outputs.outputs.pr_id }}
133
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
133
+ GITHUB_TOKEN : ${{ secrets.CI_TOKEN }}
0 commit comments