You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_log "error" "Repository is in detached HEAD state. Please make sure you check out a branch. Adjust the `ref` input accordingly.";
124
-
exit 1;
113
+
_log "warning" "Repository is in a detached HEAD state. git-auto-commit will likely handle this automatically. To avoid it, check out a branch using the ref option in actions/checkout.";
125
114
else
126
115
_log "debug" "Repository is on a branch.";
127
116
fi
128
117
}
129
118
119
+
_switch_to_branch() {
120
+
echo "INPUT_BRANCH value: $INPUT_BRANCH";
121
+
122
+
# Fetch remote to make sure that repo can be switched to the right branch.
123
+
if "$INPUT_SKIP_FETCH"; then
124
+
_log "debug" "git-fetch will not be executed.";
125
+
else
126
+
_log "debug" "git-fetch will be executed.";
127
+
git fetch --depth=1;
128
+
fi
129
+
130
+
# If `skip_checkout`-input is true, skip the entire checkout step.
131
+
if "$INPUT_SKIP_CHECKOUT"; then
132
+
_log "debug" "git-checkout will not be executed.";
133
+
else
134
+
_log "debug" "git-checkout will be executed.";
135
+
# Create new local branch if `create_branch`-input is true
0 commit comments