Skip to content

Commit 28647c8

Browse files
committed
up
1 parent 4515c43 commit 28647c8

File tree

5 files changed

+36
-14
lines changed

5 files changed

+36
-14
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
1111
chmod +x /usr/local/bin/upx
1212

1313
ENV GO111MODULE=on
14+
ENV GOPROXY=https://goproxy.io
1415
ADD . .
1516
RUN for obj in `ls lib/`; do echo "build ./lib/$obj/*.go into /opt/build/$obj ..."; go build -o /opt/build/$obj ./lib/$obj/*.go; upx /opt/build/$obj; done && \
1617
chmod +x /opt/build/* && \

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
1-
# wework-bot
1+
<h1 align="center">Welcome to wework-bot 👋</h1>
2+
<p>
3+
<img alt="Version" src="https://img.shields.io/badge/version-v1.0.0-blue.svg?cacheSeconds=2592000" />
4+
</p>
25

3-
![Docker Build Status](https://img.shields.io/docker/build/notices/wework-bot.svg) ![Docker Automated build](https://img.shields.io/docker/automated/notices/wework-bot.svg)
6+
> tencent wework rebot
47
5-
> 1. 企业微信群通知机器人,目前支持gitlab
8+
## Install
9+
10+
```sh
11+
go get github.com/adnanh/webhook
12+
for obj in `ls lib/`; do echo "build ./lib/$obj/*.go into /opt/build/$obj ..."; go build -o /opt/build/$obj ./lib/$obj/*.go; done
13+
webhook -hooks `pwd`/hooks/hooks.yaml -verbose
14+
15+
```
16+
17+
## # Use docker
18+
```sh
19+
docker pull notices/wework-bot:latest
20+
docker up -d --name wework-bot -p 9000:9000 notices/wework-bot:latest
21+
22+
```
23+
24+
## Author
25+
26+
👤 **shaddock**
27+
28+
* Github: [@ntfs32](https://github.com/ntfs32)
29+
30+
## Show your support
31+
32+
Give a ⭐️ if this project helped you!
33+
34+
***
35+
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module wbot
22

33
go 1.12
44

5-
require gopkg.in/go-playground/webhooks.v5 v5.11.0 // indirect
5+
require gopkg.in/go-playground/webhooks.v5 v5.11.0

hooks/hooks.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@
2020
execute-command: /opt/scripts/example
2121
command-working-directory: /opt/scripts
2222
pass-environment-to-command:
23-
- source: header
24-
envname: X-Gitlab-Event
25-
name: X-Gitlab-Event
26-
- source: header
27-
envname: X-Gitlab-Token
28-
name: X-Gitlab-Token
29-
- source: url
30-
name: key
31-
envname: KEY
3223
- source: entire-payload
3324
name: payload
3425
envname: payload

lib/example/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
func main() {
9-
fmt.Println(getenv("payload"))
9+
fmt.Println(getEnv("payload"))
1010
}
1111

1212

0 commit comments

Comments
 (0)