Skip to content

Commit c2439ad

Browse files
committed
Try this
1 parent 7b29742 commit c2439ad

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/merge_master_to_dev.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
id: merge
2727
run: |
2828
git fetch origin master
29-
# Create a unique branch name
3029
BRANCH_NAME="merge-master-into-dev-4.0-$(date +'%Y%m%d%H%M%S')"
3130
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
3231
@@ -42,6 +41,13 @@ jobs:
4241
git push origin HEAD:dev/4.0
4342
echo "Merged cleanly and pushed to dev/4.0."
4443
44+
- name: Commit conflict markers and push temp branch (excluding workflows)
45+
if: env.MERGE_EXIT_CODE != '0'
46+
run: |
47+
git add . ':!**/.github/workflows/**'
48+
git commit -m "Conflict: merge master into dev/4.0 (with conflicts)"
49+
git push origin ${{ env.BRANCH_NAME }}
50+
4551
- name: Create Pull Request if merge failed
4652
if: env.MERGE_EXIT_CODE != '0'
4753
uses: peter-evans/create-pull-request@v7

0 commit comments

Comments
 (0)