Skip to content

MuelNova/go-github-webhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-GitHub-Webhooks

✨ Webhooks Builder Written in Golang. ✨

license golang

GitHub last commit

Installation

git clone https://github.com/MuelNova/go-github-webhooks.git
cd go-github-webhooks/src
go build

Run as service

mkdir ~/.config/systemd/user -p
cp go-github-webhooks.example ~/.config/systemd/user/go-github-webhooks.service

Edit ~/.config/systemd/user/go-github-webhooks.service to the config you want.

systemctl --user daemon-reload
systemctl --user start go-github-webhooks

Configuration

cp .env.example .env
Item Description Default Value Type
GITHUB_SECRET Webhook secret, see below - Required
PORT Listening port 4567 Optional
EXTRA_COMMAND Command to be executed when receiving PUSH event. - Optional
WORK_DIR EXTRA_COMMAND Work Directory Current Dir Optional

Usage

First, go the the repo you want to listen, click settings

settings

Find Webhooks, then click Add webhook

webhook

webhook_settings

The Payload URL should be your ip or your domain name and your port, we recommend you to use HTTPS instead of HTTP.

The Secret you set should be filled into GITHUB_SECRET as well.

For safety consideration, the Secret is a must in the configuration.

About

Do something when receiving github-repo PUSH event, written in Golang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages