From 618fc1f7e1752e81cc75d77befb54829b5106d20 Mon Sep 17 00:00:00 2001 From: Aaron Dalton Date: Sun, 24 Mar 2024 19:11:37 -0400 Subject: [PATCH] Use rebase for fork sync --- .github/workflows/fork-sync.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fork-sync.yml b/.github/workflows/fork-sync.yml index 42631afd..668fb385 100644 --- a/.github/workflows/fork-sync.yml +++ b/.github/workflows/fork-sync.yml @@ -37,10 +37,8 @@ jobs: if: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}} run: | for TAG in ${NEW_TAGS}; do - git checkout -b release/${TAG} ${TAG} - git rm .github/workflows/* - git commit -m "Remove existing workflows" - git rev-list --no-merges --reverse main ^upstream/main | git cherry-pick --stdin --keep-redundant-commits + git checkout -b release/${TAG} main + git rebase -onto ${TAG} upstream/main done for TAG in ${NEW_TAGS}; do git push -u origin release/${TAG}