From f3af5fdb748511feb4b4f4976139e3d04e1d4ff5 Mon Sep 17 00:00:00 2001 From: Cesar Munoz <56847527+LikeTheSalad@users.noreply.github.com> Date: Fri, 17 May 2024 16:47:44 +0200 Subject: [PATCH 1/2] Fetching remote branches before switching to version branch --- .github/workflows/updateVersionBranch.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/updateVersionBranch.yml b/.github/workflows/updateVersionBranch.yml index 8dfd2814..ea1bbf88 100644 --- a/.github/workflows/updateVersionBranch.yml +++ b/.github/workflows/updateVersionBranch.yml @@ -36,6 +36,7 @@ jobs: - run: | CONFLICT_RESOLUTION_BRANCH="post-release/main-to-${{ env.BASE_BRANCH }}" + git fetch --all git switch ${{ env.BASE_BRANCH }} git checkout -b $CONFLICT_RESOLUTION_BRANCH git merge main --strategy-option theirs From a42eea4874954de7203907f4ef5a51d68a664c8e Mon Sep 17 00:00:00 2001 From: Cesar Munoz <56847527+LikeTheSalad@users.noreply.github.com> Date: Mon, 20 May 2024 10:00:01 +0200 Subject: [PATCH 2/2] Using checkout action params to fetch all git branches --- .github/workflows/updateVersionBranch.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/updateVersionBranch.yml b/.github/workflows/updateVersionBranch.yml index ea1bbf88..9adcb758 100644 --- a/.github/workflows/updateVersionBranch.yml +++ b/.github/workflows/updateVersionBranch.yml @@ -28,6 +28,8 @@ jobs: email: ${{ env.GIT_EMAIL }} token: ${{ env.GITHUB_TOKEN }} - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions-ecosystem/action-regex-match@v2 id: major-version with: @@ -36,7 +38,6 @@ jobs: - run: | CONFLICT_RESOLUTION_BRANCH="post-release/main-to-${{ env.BASE_BRANCH }}" - git fetch --all git switch ${{ env.BASE_BRANCH }} git checkout -b $CONFLICT_RESOLUTION_BRANCH git merge main --strategy-option theirs