mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2025-08-01 07:56:08 +08:00
Fetch Repo before git checkout
This commit is contained in:
@@ -39,6 +39,9 @@ _git_is_dirty() {
|
|||||||
_switch_to_branch() {
|
_switch_to_branch() {
|
||||||
echo "INPUT_BRANCH value: $INPUT_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
|
# Switch to branch from current Workflow run
|
||||||
git checkout $INPUT_BRANCH;
|
git checkout $INPUT_BRANCH;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user