File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Crowdin Auto-Merge
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 0 0 * * 5' # This cron expression runs the workflow every Friday at midnight (UTC)
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ crowdin-auto-merge :
10
+ if : github.event.repository.fork == false
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v4
15
+ with :
16
+ fetch-depth : 0
17
+
18
+ - name : Setup Git
19
+ run : |
20
+ git config --global user.name 'github-actions[bot]'
21
+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
22
+
23
+ - name : Auto-merge pull request
24
+ run : |
25
+ PR_NUMBER=$(gh pr list --repo ${{ github.repository }} --author 'MTABot' --base 'master' --head 'l10n/master' --state open --json number --jq '.[0].number')
26
+ if [ -n "$PR_NUMBER" ]; then
27
+ gh pr merge $PR_NUMBER --squash --repo ${{ github.repository }} --admin --subject "New Crowdin updates (PR #$PR_NUMBER)" --body ""
28
+ git push origin --delete l10n/master
29
+ fi
30
+ env :
31
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments