Skip to content

gitub_auto_pull is a small service listening for github push hook notifications, and updating the corresponding folder.

Notifications You must be signed in to change notification settings

yazgazan/github_auto_pull

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github_auto_pull

gitub_auto_pull is a small service listening for github push hook notifications, and updating the corresponding folder.

Install

You need go to be installed.

go get -u github.com/yazgazan/github_auto_pull

Usage

Example :

github_auto_pull
# config.toml

Listen = ":8454"

# no default listen port
# repos.toml

# repo1_name should be the repository name on github
[[repo1_name]]
Folder = "./repo1_prod"
Remote = "origin"
Branch = "master"

# when triggered, the following shell command will be executed : `sh -c "cd './repo1_prod'; git pull 'origin' 'master'"`

[[repo1_name]]
Folder = "./repo1_test"
Remote = "origin"
Branch = "test"

[[repo2_name]]
Folder = "./repo2"
Remote = "origin"
Branch = "master"

To configure your github repository, you need to add this service address to the webhooks in the github settings (settings > webhooks & Serices > Add webhook). Be sure to leave the "Content type" field to application/json, the "Secret" field empty and the "Just the push event" checked.

Todo

  • add support for the Secret

About

gitub_auto_pull is a small service listening for github push hook notifications, and updating the corresponding folder.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages