Yet another GitHub Webhook listener, built with rifling.
bash
cargo install trigger
Prepare your trigger.yaml
Example:
```yaml
listen:
host: 0.0.0.0:9999
secret: asdasdasd
events: push: bash -c generate.sh watch: echo Yooooooooooooooooooo ``` In this example, trigger will:
0.0.0.0:9999
bash -c generate
after receiving a valid payload with secret asdasdasd
and event push
.Yooooooooooooooooooo
after receiving a valid payload with event watch
.
location /hook {
proxy_pass http://0.0.0.0:9999/;
}
Note: It's always recommended to use a reverse proxy.bash
trigger
trigger.yaml
:
listen
section:
secret
isn't necessary, but without it trigger won't be able to check payload's validity.events
section:
{payload}
will be replaced with unparsed payload Systemd unit (trigger.service
):
```systemd
[Unit]
Description=Yet another GitHub Webhook listener
After=network-online.target
[Service] Type=simple WorkingDirectory=/path/to/your/config/file ExecStart=/path/to/trigger Restart=always RestartSec=3
[Install] WantedBy=multi-user.target ```
This software is distributed under the terms of MIT license, for more details, please consult LICENSE file.
Trigger uses prettyenvlogger and log to log.
Trigger uses yaml-rust to parse configurations.
Trigger uses hyper to create web server.
Trigger uses run_script to run shell code.