Skip to content

Commit

Permalink
Merge pull request #5 from Toilal/local-branch-support
Browse files Browse the repository at this point in the history
Fix issue when local branch already exists (actions/checkout@v2 support)
  • Loading branch information
drdanz authored Jan 13, 2021
2 parents 63ff174 + a567b84 commit 4047e51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ git config --global user.email "$INPUT_USER_EMAIL"
set -o xtrace

git fetch origin $INPUT_STABLE_BRANCH
git checkout -b $INPUT_STABLE_BRANCH origin/$INPUT_STABLE_BRANCH
(git checkout $INPUT_STABLE_BRANCH && git pull)||git checkout -b $INPUT_STABLE_BRANCH origin/$INPUT_STABLE_BRANCH

git fetch origin $INPUT_DEVELOPMENT_BRANCH
git checkout -b $INPUT_DEVELOPMENT_BRANCH origin/$INPUT_DEVELOPMENT_BRANCH
(git checkout $INPUT_DEVELOPMENT_BRANCH && git pull)||git checkout -b $INPUT_DEVELOPMENT_BRANCH origin/$INPUT_DEVELOPMENT_BRANCH

if git merge-base --is-ancestor $INPUT_STABLE_BRANCH $INPUT_DEVELOPMENT_BRANCH; then
echo "No merge is necessary"
Expand Down

0 comments on commit 4047e51

Please sign in to comment.