Skip to content
arrow-up-circle

GitHub Action

Git push with retry

v2.0 Latest version

Git push with retry

arrow-up-circle

Git push with retry

Try to push to remote repository specified number of times

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Git push with retry

uses: cutlerydrawer/[email protected]

Learn more about this action in cutlerydrawer/action-git-try-push

Choose a version

Git try push GitHub Action

An action that tries to make a git push. If it does not succeed, then wait some time, perform git pull --rebase and try again. The number of maximum tries is controllable via tries input.

Usage

- name: Try pushing
  uses: cutlerydrawer/action-git-try-push@v2
  with:
    # Optional, used for pushing
    token: ${{github.token}}
    # Optional, defaults to current directory
    directory: path/to/repo
    # Optional, defaults to:
    remote: origin
    # Optional, defaults to:
    branch: master
    # Optional, defaults to:
    tries: 20