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
This has been resolved in the [checkout](actions/checkout#770) action and would already be set by default.
Update README.md
Fix removed code lines
* Add force with lease support
* Update the documentation
fix: github_token and github_url optional
Add atomic push
Since time elapses between the checkout the github workflow performs and the eventual push this action invokes the remote HEAD may have changed. If this is the case the HEAD update will be rejected but any tag (and their commits) will be pushed.
In general I think this operation should be atomic, either we push everything or we push nothing.
Force pushes still work the way you would expect (i.e. if we force the HEAD update with --atomic everything is still pushed)
This also protects from the situation where someone else has seized your tag name in the meantime but not updated your HEAD.
See git docs for more information - https://git-scm.com/docs/git-push#Documentation/git-push.txt---no-atomic
Add option to control atomic switch
Use node16 to run action
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
Update the documentation and the push process
feat: Restructure the code
Update the documentation and the push process
| branch | string | (default) | Destination branch to push changes. <br /> Can be passed in using `${{ github.ref }}`. |
74
-
| force | boolean | false | Determines if force push is used. |
75
-
| tags | boolean | false | Determines if `--tags` is used. |
76
-
| directory | string | '.' | Directory to change to before pushing. |
77
-
| repository | string | '' | Repository name. <br /> Default or empty repository name represents <br /> current github repository. <br /> If you want to push to other repository, <br /> you should make a [personal access token](https://github.com/settings/tokens) <br /> and use it as the `github_token` input. |
| ssh | boolean | false | Determines if ssh/ Deploy Keys is used. |
121
+
| branch | string | (default) | Destination branch to push changes. <br /> Can be passed in using `${{ github.ref }}`. |
122
+
| force | boolean | false | Determines if force push is used. |
123
+
| force_with_lease | boolean | false | Determines if force-with-lease push is used. Please specify the corresponding branch inside `ref` section of the checkout action e.g. `ref: ${{ github.head_ref }}`. |
124
+
| atomic | boolean | true | Determines if [atomic](https://git-scm.com/docs/git-push#Documentation/git-push.txt---no-atomic) push is used. |
125
+
| tags | boolean | false | Determines if `--tags` is used. |
126
+
| directory | string | '.' | Directory to change to before pushing. |
127
+
| repository | string | '' | Repository name. <br /> Default or empty repository name represents <br /> current github repository. <br /> If you want to push to other repository, <br /> you should make a [personal access token](https://github.com/settings/tokens) <br /> and use it as the `github_token` input. |
78
128
79
129
## Troubeshooting
80
130
81
-
Please be aware, if your job fails and the corresponding output log looks like the following error, update your used verson of the action to `ad-m/github-push-action@master`:
131
+
Please be aware, if your job fails and the corresponding output log looks like the following error, update your used version of the action to `ad-m/github-push-action@master`:
82
132
```log
83
133
Push to branch ***************
84
134
fatal: unsafe repository ('/github/workspace' is owned by someone else)
@@ -87,6 +137,15 @@ To add an exception for this directory, call:
0 commit comments