File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ # gh-hook-command
2+ Sets up a simple HTTP server. The only endpoint it serves is ` POST /hook ` . When
3+ a GitHub webhook is sent there, the request is validated, and the command
4+ specified in the configuration file is run.
5+
6+ ## Installation
7+ ```
8+ $ cargo build --release
9+ $ target/release/gh-hook-command
10+ ```
11+
12+ ## Configuration
13+ The path to the configuration file is set by the ` GH_HOOK_CONFIG ` environment
14+ variable. If it's unset, ` ./config.toml ` is used instead. The file will be
15+ created if it doesn't exist.
16+
17+ ``` toml
18+ # The webhook secret key.
19+ secret = " secret secret really secret"
20+
21+ # Address to bind to.
22+ bind = " 0.0.0.0:8000"
23+
24+ # The command list.
25+ [commands ]
26+ # This runs `cat /dev/stdin && echo ""' on the `push` event.
27+ push = ' cat /dev/stdin && echo ""'
28+ ```
You can’t perform that action at this time.
0 commit comments