From 413955fb39b72a1c08c6852052b0626a175b1ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 8 Nov 2023 22:01:39 +0100 Subject: [PATCH] CI: Create local repo awareness of branch ref --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4815e42495..19a13d7184 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -484,7 +484,13 @@ jobs: - name: Push to stable release branch if master contains stable version if: ${{ env.versionmajor == env.STABLE_VERSION }} - run: git push -u origin master:${{ env.branch }} + run: | + # Get the full history of the branch leading up to current commit + git fetch --unshallow + # Make git aware of the release branch + git fetch -u origin ${{ env.branch }} + # Push the full history into the release branch + git push -u origin master:${{ env.branch }} - name: Else case, master did not contain the stable version if: ${{ env.versionmajor != env.STABLE_VERSION }}