Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 1715f57

Browse files
committed
readme
1 parent 57d24be commit 1715f57

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,33 @@ gohub
33

44
## What is gohub?
55

6-
gohub is a little webserver written in go. He waits for webhook calls by github to run little shell commands
6+
gohub is a little webserver written in go. He waits for webhook calls by github to run little shell commands.
77

88
## What is it good for?
99

10-
imagine you have your repo spread over several instances. you can use gohub to automate updating all your repos.
10+
Imagine you have your repo spread over several instances. You can use gohub to automate updating all your cloned repos.
1111

1212
## How to use
1313

14-
coming soon...
14+
Just edit the config.json to your needs. A short example:
15+
You want to track the status of your Repository "repo" and the branch master. If there is an update to this branch you want to execute your shell script "niftyscript.sh".
16+
17+
```json
18+
{
19+
"Hooks":[
20+
"Repo":"repo",
21+
"Branch":"master",
22+
"Shell":"niftyscript.sh"
23+
]
24+
}
25+
```
26+
27+
Now start the server with
28+
29+
go run main.go --port 6578
30+
31+
and add a git-webhook for your.domain.com:6578/repo_master. Everytime you push to master, your script gets executed.
32+
33+
## What about safety?
34+
35+
Git webhooks use only 4 different ips for their webhooks. (207.97.227.253, 50.57.128.197, 108.171.174.178, 50.57.231.61) You can easily restrict access to your gohup server by using either a firewall or an equivalent nginx configuration.

0 commit comments

Comments
 (0)