Skip to content

Commit 092959a

Browse files
committed
Auto-resolve README.md conflicts in sync workflow
1 parent 9d434db commit 092959a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/sync-development-to-main.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Checkout Repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020

@@ -30,7 +30,12 @@ jobs:
3030
3131
- name: Merge Development into Main
3232
run: |
33-
git merge --no-ff development -m "Automated merge from development to main"
33+
if ! git merge --no-ff development -m "Automated merge from development to main"; then
34+
echo "Merge conflict detected, auto-resolving README.md..."
35+
git checkout main -- README.md 2>/dev/null || git rm README.md 2>/dev/null || true
36+
git add -A
37+
git commit --no-edit
38+
fi
3439
3540
- name: Push Changes
3641
run: git push origin main

0 commit comments

Comments
 (0)