Update sync-upstream-frontend.yml
Fix: Use merge instead of rebase for upstream sync
This commit is contained in:
1 parent
c2dcbc2369
commit
f22edd1f1d
1 file changed
+5
-7
@@ -1,4 +1,4 @@
|
|||||||
name: Sync Upstream (Frontend)
|
name: Sync Upstream (Backend)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -18,18 +18,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Add Upstream Remote and Fetch Latest Changes
|
- name: Add Upstream Remote and Fetch Latest Changes
|
||||||
run: |
|
run: |
|
||||||
git remote add upstream https://github.com/bluewave-labs/checkmate.git || true
|
git remote add upstream https://github.com/bluewave-labs/checkmate-backend.git || true
|
||||||
git fetch upstream develop --prune
|
git fetch upstream develop --prune
|
||||||
if ! git show-ref --quiet refs/remotes/upstream/develop; then
|
if ! git show-ref --quiet refs/remotes/upstream/develop; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
git checkout upstream/develop
|
|
||||||
git reset --hard origin/develop
|
|
||||||
|
|
||||||
- name: Create and Checkout New Shadow Branch
|
- name: Create and Checkout New Shadow Branch
|
||||||
run: |
|
run: |
|
||||||
git checkout -b ${{ env.BRANCH_NAME }} develop
|
git checkout -b ${{ env.BRANCH_NAME }} develop
|
||||||
git rebase upstream/develop || (git rebase --abort && exit 1)
|
git merge --no-ff upstream/develop || echo "Merge conflicts detected, resolving via PR."
|
||||||
|
|
||||||
- name: Check for New Changes Before Pushing
|
- name: Check for New Changes Before Pushing
|
||||||
run: |
|
run: |
|
||||||
@@ -44,8 +42,8 @@ jobs:
|
|||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v5
|
uses: peter-evans/create-pull-request@v5
|
||||||
with:
|
with:
|
||||||
title: "Sync Upstream (Frontend) - ${{ env.BRANCH_NAME }}"
|
title: "Sync Upstream (Backend) - ${{ env.BRANCH_NAME }}"
|
||||||
body: "Automated upstream sync for frontend repository. Please review and merge if needed."
|
body: "Automated upstream sync for backend repository. Please review and resolve conflicts before merging."
|
||||||
branch: ${{ env.BRANCH_NAME }}
|
branch: ${{ env.BRANCH_NAME }}
|
||||||
base: develop
|
base: develop
|
||||||
labels: "sync, upstream"
|
labels: "sync, upstream"
|
||||||
|
|||||||
Reference in new issue
Block a user