go-webhook

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 3 Imported by: 0

README

go-webhook

📡 Overview

The Go-webhook is a webhook tool on github, That can trigger bash scripts after monitoring git's push behavior

📜 Usage

1. Install

go get -u github.com/yezihack/go-webhook

2. Download

Release

cp ~/go-webhook /usr/bin
chmod u+x /usr/bin/go-webhook
  • Default Run: go-webhook --bash /home/my.sh --secret mysecret
  • Quiet Mode Run: go-webhook --bash /home/my.sh --secret mysecret --quiet
  • Custom Port Mode Run: go-webhook --bash /home/my.sh --secret mysecret --port 6100 --quiet
  • Hidden Secret Mode Run: go-webhook --bash /home/my.sh --quiet
  • Daemonize run: nohup go-webhook --bash /home/my.sh --secret mysecret --quiet &

💌 Features

  • Just run the binaries file
  • Custom your bash script
  • Custom your enter secret
  • Custom your port. 0 ~ 65535
  • Quiet operation

中文

  • 直接运行二进制文件
  • 自定义脚本路径
  • 自定义密码
  • 自定义端口. 0 ~ 65535
  • 安静模式
GLOBAL OPTIONS:
   --bash value, -b value    Execute the script path. eg: /home/hook.sh
   --port value, -p value    http port (default: 6666)
   --secret value, -s value  github hook secret
   --quiet, -q               quiet operation (default: false)
   --help, -h                show help (default: false)
   --version, -v             print the version (default: false)

中文

GLOBAL OPTIONS:
   --bash value, -b value    Execute the script path. eg: /home/hook.sh 自定义脚本
   --port value, -p value    http port (default: 6666) 自定义端口,默认6666
   --secret value, -s value  github hook secret 自定义密码, 不允许为空
   --quiet, -q               quiet operation (default: false) 安静模式,默认关闭. -q 开启,不输出任何信息
   --help, -h                show help (default: false) 
   --version, -v             print the version (default: false)

HOW DOING

  • step 1:: Run your go-webhook server

    • notice: port default 6666, http-path: /web-hook
    • 注意: 端口默认为6666, 可以更改, http的路由: /web-hook
    • 查看自己的外网Ip: curp ip.sb

    image-20200422194800401

  • step 2: Add webhook

    • 添加 webhook 参数

    image-20200422194224139 image-20200422195200683

👋 Thanks

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL