Skip to content

Repository files navigation

minibuild

a small service to accept webhook requests from github and run scripts upon receipt

i made this so i'd be able to build and deploy my website automatically on github push, hence the name minibuild

how to use

build with cargo build, run with cargo run

if you want debug logging, run it with the environment variable RUST_LOG="info,minibuild=debug"
if you set PROXY_LOGGING to true then the program will also debug the value of X-Forwarded-For

there is a dockerfile but i realised only after making it that it's kinda pointless. this thing is meant to run scripts on the host machine not a docker container like this is just pointless. i mean i guess you could get it to work in a docker container but i cant be fucked. the option's always there though

how to config

# you can add as many [[targets]] entries as you want
# don't double up on paths as only the first entry matching the path will be evaluated

[[targets]]
path = "build-website" # the web path of the webhook, in this case would be whereveryourehostingit.com/webhook/build-website
# token is optional, but if you dont include it then anyone sending a POST request to the endpoint will trigger the script
script = "cd /some/folder/somewhere && build command" # minibuild will run `bash -c "command"`

[[targets]]
path = "secret-website" # localhost example for a little change: localhost:2184/webhook/secret-website
token = "secret token you would also give to github"
script = "some other command idk" # `bash -c "some other command idk"`

About

mini github webhook server

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages