mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-12-06 02:09:04 +00:00
Remove _switch_to_branch function
This commit is contained in:
parent
0aca01a1ef
commit
e833d4f211
@ -35,8 +35,6 @@ _main() {
|
|||||||
|
|
||||||
_set_github_output "changes_detected" "true"
|
_set_github_output "changes_detected" "true"
|
||||||
|
|
||||||
_switch_to_branch
|
|
||||||
|
|
||||||
_add_files
|
_add_files
|
||||||
|
|
||||||
# Check dirty state of repo again using git-diff.
|
# Check dirty state of repo again using git-diff.
|
||||||
@ -86,32 +84,6 @@ _git_is_dirty() {
|
|||||||
[ -n "$(git status -s $INPUT_STATUS_OPTIONS -- ${INPUT_FILE_PATTERN_EXPANDED:+${INPUT_FILE_PATTERN_EXPANDED[@]}})" ]
|
[ -n "$(git status -s $INPUT_STATUS_OPTIONS -- ${INPUT_FILE_PATTERN_EXPANDED:+${INPUT_FILE_PATTERN_EXPANDED[@]}})" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
_switch_to_branch() {
|
|
||||||
echo "INPUT_BRANCH value: $INPUT_BRANCH";
|
|
||||||
|
|
||||||
# Fetch remote to make sure that repo can be switched to the right branch.
|
|
||||||
# if "$INPUT_SKIP_FETCH"; then
|
|
||||||
# _log "debug" "git-fetch will not be executed.";
|
|
||||||
# else
|
|
||||||
# git fetch --depth=1;
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# # If `skip_checkout`-input is true, skip the entire checkout step.
|
|
||||||
# if "$INPUT_SKIP_CHECKOUT"; then
|
|
||||||
# _log "debug" "git-checkout will not be executed.";
|
|
||||||
# else
|
|
||||||
# # Create new local branch if `create_branch`-input is true
|
|
||||||
# if "$INPUT_CREATE_BRANCH"; then
|
|
||||||
# # shellcheck disable=SC2086
|
|
||||||
# git checkout -B $INPUT_BRANCH --;
|
|
||||||
# else
|
|
||||||
# # Switch to branch from current Workflow run
|
|
||||||
# # shellcheck disable=SC2086
|
|
||||||
# # git checkout $INPUT_BRANCH --;
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_add_files() {
|
_add_files() {
|
||||||
echo "INPUT_ADD_OPTIONS: ${INPUT_ADD_OPTIONS}";
|
echo "INPUT_ADD_OPTIONS: ${INPUT_ADD_OPTIONS}";
|
||||||
_log "debug" "Apply add options ${INPUT_ADD_OPTIONS}";
|
_log "debug" "Apply add options ${INPUT_ADD_OPTIONS}";
|
||||||
@ -157,6 +129,8 @@ _tag_commit() {
|
|||||||
|
|
||||||
_push_to_github() {
|
_push_to_github() {
|
||||||
|
|
||||||
|
echo "INPUT_BRANCH value: $INPUT_BRANCH";
|
||||||
|
|
||||||
echo "INPUT_PUSH_OPTIONS: ${INPUT_PUSH_OPTIONS}";
|
echo "INPUT_PUSH_OPTIONS: ${INPUT_PUSH_OPTIONS}";
|
||||||
_log "debug" "Apply push options ${INPUT_PUSH_OPTIONS}";
|
_log "debug" "Apply push options ${INPUT_PUSH_OPTIONS}";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user