Smol webhook (crates.io)
A small rust project that is based on the webserver project in the rust book.
This script will listen to the github webhook for a push event. It will check branch and it will execute a script placed near the executable.
- Install Rust
cargo install smol_webhook
- Configure the server with the environment variables listsed below.
- Run it with
/path/to/cargo_binary/smol_webhook
e.g..cargo/bin/smol_webhook
This application could be configured by using environment variables.
SMOL_WEBHOOK_IP
ip_addr
- IPv4 to listen. default=127.0.0.1SMOL_WEBHOOK_PORT
port_number
- port to listen. default=7878SMOL_WEBHOOK_BRANCH
branch_name
- a branch name that this webhook will watch on. default=masterSMOL_WEBHOOK_SCRIPT
script_path
- path of the executable script. default=./test.shSMOL_WEBHOOK_KEY
secret_key
- secret key to check in the webhook event. default=""(empty string)