@@ -27,6 +27,18 @@ _log() {
27
27
}
28
28
29
29
_main () {
30
+ if " $INPUT_SKIP_FETCH " ; then
31
+ _log " warning" " git-auto-commit: skip_fetch has been removed in v6. It does not have any effect anymore." ;
32
+ fi
33
+
34
+ if " $INPUT_SKIP_CHECKOUT " ; then
35
+ _log " warning" " git-auto-commit: skip_checkout has been removed in v6. It does not have any effect anymore." ;
36
+ fi
37
+
38
+ if " $INPUT_CREATE_BRANCH " ; then
39
+ _log " warning" " git-auto-commit: create_branch has been removed in v6. It does not have any effect anymore." ;
40
+ fi
41
+
30
42
_check_if_git_is_available
31
43
32
44
_switch_to_repository
@@ -39,8 +51,6 @@ _main() {
39
51
40
52
_set_github_output " changes_detected" " true"
41
53
42
- _switch_to_branch
43
-
44
54
_add_files
45
55
46
56
# Check dirty state of repo again using git-diff.
@@ -97,32 +107,6 @@ _git_is_dirty() {
97
107
[ -n "$gitStatus " ]
98
108
}
99
109
100
- _switch_to_branch() {
101
- echo "INPUT_BRANCH value: $INPUT_BRANCH ";
102
-
103
- # Fetch remote to make sure that repo can be switched to the right branch.
104
- if "$INPUT_SKIP_FETCH "; then
105
- _log "debug" "git-fetch will not be executed.";
106
- else
107
- git fetch --depth=1 ;
108
- fi
109
-
110
- # If `skip_checkout`-input is true, skip the entire checkout step.
111
- if "$INPUT_SKIP_CHECKOUT "; then
112
- _log "debug" "git-checkout will not be executed.";
113
- else
114
- # Create new local branch if `create_branch`-input is true
115
- if "$INPUT_CREATE_BRANCH "; then
116
- # shellcheck disable=SC2086
117
- git checkout -B $INPUT_BRANCH --;
118
- else
119
- # Switch to branch from current Workflow run
120
- # shellcheck disable=SC2086
121
- git checkout $INPUT_BRANCH --;
122
- fi
123
- fi
124
- }
125
-
126
110
_add_files() {
127
111
echo "INPUT_ADD_OPTIONS: ${INPUT_ADD_OPTIONS} ";
128
112
_log "debug" "Apply add options ${INPUT_ADD_OPTIONS} ";
@@ -168,6 +152,8 @@ _tag_commit() {
168
152
169
153
_push_to_github() {
170
154
155
+ echo "INPUT_BRANCH value: $INPUT_BRANCH ";
156
+
171
157
echo "INPUT_PUSH_OPTIONS: ${INPUT_PUSH_OPTIONS} ";
172
158
_log "debug" "Apply push options ${INPUT_PUSH_OPTIONS} ";
173
159
0 commit comments