Skip to content

zetabotco/github-repository-sync-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action build status

Git Repository Sync Action

This action pushes all commits in the branch that this action is run on into any remote git repository.

Check out a sample workflow.

Usage

Be sure to run the actions/checkout action in a step before this action so that the git repository is initialized.

# File: .github/workflows/mirror.yml
- uses: net-engine/github-repository-sync-action@v1
  with:
    # The SSH private key for SSH connection to the target repository.
    # We strongly recommend saving this value as a GitHub Secret and using deploy
    # keys within the target repository
    ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
    # The SSH-based URL to the target repository
    target_repo_url: git@github.com:net-engine/github-repository-sync-action-test.git

Notes

Inspired by the following actions which may be more suitable for your workflow, e.g. syncing any source repository and branch to any destination, or copying all branches.

TODO

  • Support for any to and from branch, similar to actions/checkout@v2
  • Make SSH key-based authentication optional to support username/password authentication
  • Support for the pull_request event

License

The scripts and documentation in this project are released under the MIT License

About

A GitHub action to push changes to a branch in a current GitHub repository to any remote repository, i.e. another GitHub, GitLab, AWS CodeCommit repository.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 59.5%
  • Dockerfile 40.5%