From 4caaae456b79877dca10baf953a58c093919bcfe Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 19 Dec 2022 20:05:27 -0800 Subject: [PATCH] Fix target branch creation --- entrypoint.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 8bb661e..24189ca 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -69,9 +69,7 @@ git config --global --add safe.directory /github/workspace if ! git clone --single-branch --depth 1 --branch "$TARGET_BRANCH" "$GIT_CMD_REPOSITORY" "$CLONE_DIR"; then if ${CREATE_TARGET_BRANCH} && git clone --single-branch --depth 1 "$GIT_CMD_REPOSITORY" "$CLONE_DIR"; then - echo "[+] Creating branch ${TARGET_BRANCH}" - git branch ${TARGET_BRANCH} - git switch ${TARGET_BRANCH} + echo "[+] Creating target branch ${TARGET_BRANCH}" else echo "::error::Could not clone the destination repository. Command:" echo "::error::git clone --single-branch --branch $TARGET_BRANCH $GIT_CMD_REPOSITORY $CLONE_DIR"