Hooks - running stuff on Github hooks April 19, 2015 on Drew DeVault's blog

I found myself in need of a simple tool for deploying a project on every git commit, but I didn’t have a build server set up. This led to Hooks - a very simple tool that allows you to run arbitrary commands when Github’s hooks execute.

The configuration is very simple. In /etc/hooks.conf, write:

[truecraft]
repository=SirCmpwn/TrueCraft
branch=master
command=systemctl restart hooks
valid_ips=204.232.175.64/27,192.30.252.0/22,127.0.0.1

You may include any number of hooks. The valid_ips entry in that example allows you to accept hooks from Github and from localhost. Then you run Hooks itself, it will execute your command when you push a commit to your repository.

This allows you to do continuous deployment on the cheap and easy. I hope you find it useful. Hooks.

Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~sircmpwn/public-inbox@lists.sr.ht [mailing list etiquette]

Articles from blogs I read Generated by openring

Site Redesign

Hey y’all! It’s been, gosh, what, ten years? I finally finished a total site redesign: all-new backend, HTML, CSS, modern image formats, etc. It’s finally readable on mobile now! There’s a lot of accumulated cruft in the database and filesystem–aphyr.com i…

via Aphyr: Posts March 28, 2021

What's cooking on SourceHut? March 2021

Hi! Another month of development has passed, and I’m here to fill you in on what’s new. Another 686 signups this month has brought us to 21,041 users. As always, I’ll be counting on you to make the new users feel at home, please be patient with them and help…

via Blogs on Sourcehut March 15, 2021

Status update, March 2021

Hi all! This month has been a little bit more quiet than others. I’ve spent a fair bit of time working on gamescope for Valve. As usual I’ve been fixing bugs and improving gamescope itself, but I’ve also worked on the rest of the ecosystem. I’m plumbing forma…

via emersion March 15, 2021