Update sync-upstream-frontend.yml

This commit is contained in:
Ridvan Karatas authored and GitHub committed 2025-02-20 22:19:48 +03:00
1 parent ab49db3a01
commit 9611a9d745
1 file changed
+16 -4
+16 -4
View File
@@ -18,13 +18,25 @@ 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 git remote add upstream https://github.com/bluewave-labs/checkmate.git || true
git fetch upstream develop git fetch upstream develop --prune
if ! git show-ref --quiet refs/remotes/upstream/develop; then
exit 1
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 }} git checkout -b ${{ env.BRANCH_NAME }} develop
git merge --no-ff upstream/develop || true git rebase upstream/develop || (git rebase --abort && exit 1)
- name: Check for New Changes Before Pushing
run: |
if git diff --quiet develop ${{ env.BRANCH_NAME }}; then
exit 0
fi
- name: Push Shadow Branch to Private Repo - name: Push Shadow Branch to Private Repo
run: | run: |
git push origin ${{ env.BRANCH_NAME }} git push origin ${{ env.BRANCH_NAME }}