Skip to content

Commit 145918a

Browse files
committed
Add switch back to original branch in ensure branch action
1 parent 6973660 commit 145918a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/actions/ensure-release-branch/ensure-release-branch.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ if execute_command git ls-remote --heads origin "$RELEASE_VERSION_BRANCH" | grep
120120
execute_command --ignore-exit-code 1 --no-std -- git diff --quiet --cached "origin/$RELEASE_VERSION_BRANCH"
121121
diff_result=$last_cmd_result
122122
execute_command --ignore-errors --no-std -- git merge --abort
123+
# Switch back to original branch
124+
execute_command --no-std -- git switch -
123125
if [ "$diff_result" -eq 1 ]; then
124126
echo "Found file differences between $RELEASE_BRANCH and $RELEASE_VERSION_BRANCH"
125127
execute_command --no-std -- git diff --name-only "origin/$RELEASE_VERSION_BRANCH" "origin/$RELEASE_BRANCH"

0 commit comments

Comments
 (0)