From b3fc6f8a179a28aea990262b5547e175d4c5327f Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Fri, 11 Sep 2020 11:18:24 +0200 Subject: [PATCH] Revert "Creating orphan branch" --- entrypoint.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index cf10652..f51521a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,6 @@ #!/bin/bash set -eu -set -x _main() { _switch_to_repository @@ -40,13 +39,8 @@ _git_is_dirty() { _switch_to_branch() { echo "INPUT_BRANCH value: $INPUT_BRANCH"; - if git show-ref --verify --quiet refs/heads/$INPUT_BRANCH; then - # Switch to branch from current Workflow run - git checkout $INPUT_BRANCH; - else - git checkout --orphan $INPUT_BRANCH - git rm -rf . - fi + # Switch to branch from current Workflow run + git checkout $INPUT_BRANCH; } _add_files() {