|
84 | 84 | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" |
85 | 85 | git config --local user.name "github-actions[bot]" |
86 | 86 | git commit -a -m "Add changes" |
| 87 | + - name: Push changes |
| 88 | + uses: ad-m/github-push-action@master |
| 89 | + with: |
| 90 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 91 | + branch: ${{ github.ref }} |
| 92 | +``` |
| 93 | + |
| 94 | +or |
| 95 | + |
| 96 | +```yaml |
87 | 97 | - name: Push changes |
88 | 98 | uses: ad-m/github-push-action@master |
89 | 99 | with: |
@@ -303,20 +313,21 @@ jobs: |
303 | 313 |
|
304 | 314 | ### Inputs |
305 | 315 |
|
306 | | -| name | value | default | description | |
307 | | -|--------------------|---------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
308 | | -| github_token | string | `${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) <br /> or a repo scoped <br /> [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). | |
309 | | -| ssh | boolean | false | Determines if ssh/ Deploy Keys is used. | |
310 | | -| branch | string | (default) | Destination branch to push changes. <br /> Can be passed in using `${{ github.ref }}`. | |
311 | | -| force | boolean | false | Determines if force push is used. | |
312 | | -| 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 }}`. Be aware, if you want to update the branch and the corresponding tag please use the `force` parameter instead of the `force_with_lease` option. | |
313 | | -| atomic | boolean | true | Determines if atomic push is used. | |
314 | | -| push_to_submodules | string | 'on-demand' | Determines if --recurse-submodules=<strategy> is used. The value defines the used strategy. | |
315 | | -| push_only_tags | boolean | false | Determines if the action should only push the tags, default false | |
316 | | -| tags | boolean | false | Determines if `--tags` is used. | |
317 | | -| directory | string | '.' | Directory to change to before pushing. | |
318 | | -| 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. | |
319 | | -| pull | string | false | Perform a `git pull` before pushing. Accepted values: `rebase` (or `true`) uses `--rebase`, `merge` uses `--no-rebase`, `ff-only` uses `--ff-only`. Leave unset or `false` to skip the pull entirely. **Requires a real branch to be checked out** (detached HEAD state is not supported — the action will abort with an error). | |
| 316 | +| name | value | default | description | |
| 317 | +|--------------------|---------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 318 | +| token | string | '' | Preferred input name. <br /> [GITHUB_TOKEN](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) or a repo scoped [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). If unset, falls back to `github_token`. | |
| 319 | +| github_token | string | `${{ github.token }}` | Non-breaking change config option for the token parameter. | |
| 320 | +| ssh | boolean | false | Determines if ssh/ Deploy Keys is used. | |
| 321 | +| branch | string | (default) | Destination branch to push changes. <br /> Can be passed in using `${{ github.ref }}`. | |
| 322 | +| force | boolean | false | Determines if force push is used. | |
| 323 | +| 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 }}`. Be aware, if you want to update the branch and the corresponding tag please use the `force` parameter instead of the `force_with_lease` option. | |
| 324 | +| atomic | boolean | true | Determines if atomic push is used. | |
| 325 | +| push_to_submodules | string | 'on-demand' | Determines if --recurse-submodules=<strategy> is used. The value defines the used strategy. | |
| 326 | +| push_only_tags | boolean | false | Determines if the action should only push the tags, default false | |
| 327 | +| tags | boolean | false | Determines if `--tags` is used. | |
| 328 | +| directory | string | '.' | Directory to change to before pushing. | |
| 329 | +| 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 `token` input. | |
| 330 | +| pull | string | false | Perform a `git pull` before pushing. Accepted values: `rebase` (or `true`) uses `--rebase`, `merge` uses `--no-rebase`, `ff-only` uses `--ff-only`. Leave unset or `false` to skip the pull entirely. **Requires a real branch to be checked out** (detached HEAD state is not supported — the action will abort with an error). | |
320 | 331 |
|
321 | 332 | ## Troubleshooting |
322 | 333 |
|
|
0 commit comments