From 4b8393320bb0143d3c65d3617f0745d6e36a4c95 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 10 Oct 2020 17:54:11 +0200 Subject: [PATCH] Fetch Repo before git checkout --- entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index e018310..d5e0540 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -39,6 +39,9 @@ _git_is_dirty() { _switch_to_branch() { echo "INPUT_BRANCH value: $INPUT_BRANCH"; + # Fetch remote to make sure that repo can be switched to the right branch. + git fetch; + # Switch to branch from current Workflow run git checkout $INPUT_BRANCH; }