A warp & reqwest server to trigger Builds in the Drone API from a webhook endpoint.
With logging output:
RUST_LOG=info cargo run
To hack on it (cargo-watch recommended):
cargo watch -x run
Run/Deploy via docker
# Build
docker build --rm -t hum .
# Run with Inline ENV vars
docker run --rm -d -p 3030 \
-e DRONE_SERVER=https://your.drone.server \
-e DRONE_TOKEN=yourDroneToken \
--name hum hum
# Or Run with ENV var file
docker run --rm -d -p 3030 --env-file ./.env --env-file .env --name hum hum
Add your Drone Server & Token as well as address and port you want Hum to bind to via ENV Vars
# .env
DRONE_SERVER=https://your.drone.server
DRONE_TOKEN=yourDroneToken
HUM_ADDR=0.0.0.0
HUM_PORT=3030
Go to the service that needs the webhook and point it at this server
GET https://url.to.this.hum.server/<user>/<repo>
or
GET https://url.to.this.hum.server/<user>/<repo>?cancel_running=true
Loosely based on rust-reqwest-warp-example