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
Copy file name to clipboardExpand all lines: README.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Add a step like this to your workflow:
43
43
# Default: '--no-rebase'
44
44
pull_strategy: '--no-rebase or --no-ff or --rebase'
45
45
46
-
# Whether to push the commit and, if any, its tags to the repo (only `true` and `false` are accepted)
46
+
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info)
47
47
# Default: true
48
48
push: false
49
49
@@ -76,6 +76,17 @@ You can delete files with the `remove` option: that runs a `git rm` command that
76
76
The script will not stop if one of the git commands fails. E.g.: if your command shows a "fatal: pathspec 'yourFile' did not match any files" error the action will go on.
77
77
You can also use JSON or YAML arrays (e.g. `'["first", "second"]'`, `"['first', 'second']"`) to make the action run multiple `git rm` commands: the action will log how your input has been parsed. Please mind that your input still needs to be a string because of how GitHub Actions works with inputs: just write your array inside the string, the action will parse it later.
78
78
79
+
### Pushing:
80
+
81
+
By default the action runs the following command: `git push origin ${branch input} --set-upstream`. You can use the `push` input to modify this behavior, here's what you can set it to:
82
+
83
+
- `true`: this is the default value, it will behave as usual.
84
+
- `false`: this prevents the action from pushing at all, no `git push` command is run.
85
+
- any other string:
86
+
The action will use your string as the arguments for the `git push` command. Please note that nothing is used other than your arguments, and the command will result in `git push ${push input}` (no remote, no branch, no `--set-upstream`, you have to include them yourself).
87
+
88
+
One way to use this is if you want to force push to a branch of your repo: you'll need to set the `push` input to, for example, `origin yourBranch --force`.
89
+
79
90
### Tagging:
80
91
81
92
You can use the `tag` option to enter the arguments for a `git add` command. In order for the action to isolate the tag name from the rest of the arguments, it should be the first word not preceded by an hyphen (e.g. `-a tag-name -m "some other stuff"` is ok).
@@ -192,6 +203,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
192
203
193
204
<!-- markdownlint-enable -->
194
205
<!-- prettier-ignore-end -->
206
+
195
207
<!-- ALL-CONTRIBUTORS-LIST:END -->
196
208
197
209
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
0 commit comments