Skip to content

Commit 321ac6f

Browse files
ci: Combine logic of crowdin pull and crowdin merge into single action
1 parent 4700112 commit 321ac6f

2 files changed

Lines changed: 30 additions & 34 deletions

File tree

.github/workflows/crowdin_merge.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/crowdin_pull.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Crowdin pull to GitHub
1+
name: Crowdin pull and merge
22

33
on:
44
schedule:
@@ -37,3 +37,32 @@ jobs:
3737
run: |
3838
git checkout -B crowdin
3939
git push --force origin crowdin
40+
41+
merge:
42+
name: Squash merge Crowdin into Dev
43+
if: github.event_name == 'workflow_dispatch'
44+
needs: pull
45+
permissions:
46+
contents: write
47+
runs-on: ubuntu-latest
48+
steps:
49+
# Step 1: Checkout dev branch
50+
- name: Checkout dev
51+
uses: actions/checkout@v5
52+
with:
53+
ref: dev
54+
fetch-depth: 0
55+
clean: true
56+
57+
# Step 2: Fetch the latest crowdin branch
58+
- name: Fetch crowdin branch
59+
run: git fetch origin crowdin
60+
61+
# Step 3: Squash merge crowdin into dev
62+
- name: Squash merge crowdin into dev
63+
run: |
64+
git config --local user.name "Crowdin Bot"
65+
git config --local user.email "support+bot@crowdin.com"
66+
git merge --squash origin/crowdin
67+
git commit --allow-empty -m "chore: Update translations from Crowdin"
68+
git push origin dev

0 commit comments

Comments
 (0)