8000 GitHub - wei/git-sync at v1.0.1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ git-sync Public

🔃 A GitHub Action for syncing between two independent repositories using force push

Notifications You must be signed in to change notification settings

wei/git-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Git Sync

A GitHub Action for syncing between two independent repositories using force push.

Features

  • Sync branches between two Github repositories
  • Sync branches to/from a remote repository
  • Github action can be triggered on a timer or on push
  • To sync with current repository, please checkout wei/github-sync

Usage

Github Actions

action "repo-sync" {
  uses = "wei/git-sync@master"
  args = "$SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH"
  env = {
    SOURCE_REPO = ""
    SOURCE_BRANCH = ""
    DESTINATION_REPO = ""
    DESTINATION_BRANCH = ""
  }
  secrets = ["SSH_PRIVATE_KEY"]
}

SSH_PRIVATE_KEY can be omitted if using authenticated HTTPS repo clone urls like https://username:access_token@github.com/username/repository.git.

Docker

docker run --rm -e "SSH_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)" $(docker build -q .) \
  $SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH

Author

Wei He github@weispot.com

License

MIT

About

🔃 A GitHub Action for syncing between two independent repositories using force push

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

0