From: Arran Cudbard-Bell Date: Sat, 9 Nov 2024 20:54:20 +0000 (-0600) Subject: Merge instead of rebase, to keep signatures intact, and avoid local conflicts X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeba1023ee37d77357fc8ef99deeca270d2fbe23;p=thirdparty%2Ffreeradius-server.git Merge instead of rebase, to keep signatures intact, and avoid local conflicts --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 258952316eb..0c6c2a409cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -251,22 +251,27 @@ jobs: - name: Set up Git with `GITHUB_TOKEN` run: | git config --global url."https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" - - - name: "Merge into upstream dev branch and update local branch" - run: | git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" git config --global commit.gpgSign true git config --global gpg.format ssh - # Fetch all the branches - git fetch --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* + # First, as this was a shallow checkout, and only the user's branch was fetched, we need + # to fetch the rest of the branches, and more history. + # + # Then, we attempt to checkout the master branch, and merge the user's branch into it. + - name: "Merge into upstream dev branch and update local branch" + env: + BRANCH: developer/${{ github.actor }} + run: | + git fetch --depth=1000 --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* - echo "Rebasing from master" - git pull --rebase --ff-only origin master + echo "Merging master into user branch: ${BRANCH}" + git checkout --progress --force -B master origin/master + git merge --no-commit --no-edit "${BRANCH}" - echo "Pushing to user branch: ${{ github.actor }}" - git push origin "HEAD:developer/${{ github.actor }}" + echo "Pushing to user branch: ${BRANCH}" + git push origin "HEAD:${BRANCH}" echo "Pushing to master" - git push origin HEAD:master + git push origin HEAD:master || true