Fix: Use cherry-pick instead of merge for upstream sync
This commit is contained in:
1 parent
97e7074bf9
commit
7345a81d22
1 file changed
+12
-2
@@ -34,9 +34,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git checkout -b ${{ env.BRANCH_NAME }} develop
|
git checkout -b ${{ env.BRANCH_NAME }} develop
|
||||||
|
|
||||||
- name: Merge Upstream Changes into Shadow Branch
|
- name: Identify New Commits
|
||||||
|
id: check_commits
|
||||||
run: |
|
run: |
|
||||||
git merge --no-ff upstream/develop -m "Merge latest upstream changes from checkmate"
|
NEW_COMMITS=$(git log develop..upstream/develop --pretty=format:"%H" | wc -l)
|
||||||
|
echo "New commits: $NEW_COMMITS"
|
||||||
|
if [ "$NEW_COMMITS" -eq 0 ]; then
|
||||||
|
echo "No new commits. Exiting."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Cherry-pick New Commits
|
||||||
|
run: |
|
||||||
|
git cherry-pick develop..upstream/develop || (git cherry-pick --abort && exit 1)
|
||||||
git push origin ${{ env.BRANCH_NAME }}
|
git push origin ${{ env.BRANCH_NAME }}
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
|
|||||||
Reference in new issue
Block a user