使用go中写的webhook为cicd提供方便

116 阅读1分钟

go-webhook

使用go编写的webhook,为cicd提供便利。

安装

git clone https://github.com/cexll/go-webhook.git
go build -o webhook main.go

配置

{
  "github": [
    {
      "name": "cexll/go-webhook",
      "password": "password",
      "ref": "refs/heads/master",
      "hook_name": "push",
      "cmds": [
        "git -C /yourpath/project pull"
      ]
    }
  ],
  "gitee": [
    {
      "name": "cexll/go-webhook",
      "password": "password",
      "ref": "refs/heads/master",
      "hook_name": "push_hooks",
      "cmds": [
        "git -C /yourpath/project pull"
      ]
    }
  ]
}