anyone-developer / anyone-push-back-repo

This action helps you push back to pull requests when the user made changes in action. Then use this action to push back to your repo
GNU General Public License v3.0
3 stars 0 forks source link
anyone-developer anyone-push-back-repo github-actions workflow

anyone-push-back-repo

test-create-file test-delete-file license

This action helps you push back to pull requests when the user made changes in action. Then use this action to push back to your repo. The action will check modification if the current branch had staged files or unstaged files. Then decide to push a commit.

If you like my module, please buy me a coffee.

More and more tiny and useful GitHub action modules are on the way. Please donate to me. I accept a part-time job contract. if you need, please contact me: zhang_nan_163@163.com

Be attention

Before you use this action, you should use actions/checkout@v2 to check out your repository for this action. checkout v1 probably won't work. I would not guarantee that will work.

Add Personal Access Token to avoid that push event blocking

Important: If you have other pull request checks besides the following workflow then you must use a Personal Access Token instead of the default GITHUB_TOKEN. This is due to a deliberate limitation imposed by GitHub Actions that events raised by a workflow (such as push) cannot trigger further workflow runs. This is to prevent accidental "infinite loop" situations, and as an anti-abuse measure. Using a repo scoped Personal Access Token is an approved workaround. See this GitHub issue for further detail on the workaround.

- uses: actions/checkout@v2
  with:
    token: ${{ secrets.PAT }}

Inputs

strategy-option

action will rebase to target branch with a specific strategy. usually will use -X. default is 'ours'. Please reference here: https://www.atlassian.com/git/tutorials/using-branches/merge-strategy

actor

commiter username. default will retrieve from ${{github.actor}}

actor-email

committer email. defail will use ${{github.actor}}@users.noreply.github.com

Outputs

modified

modified flag 1 as "true" or 0 as "false"

Example usage

uses: anyone-developer/anyone-push-back-repo@main
with:
  strategy-option: 'theirs'
  actor: 'Edward-Roshan'
  actor-email: 'zhang_nan_163@163.com'

Donation

PalPal: https://paypal.me/nzhang4