加入电报通知
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
李寻欢 2020-01-07 10:21:59 +08:00
parent f5208bfb47
commit 217f59a75b
2 changed files with 13 additions and 6 deletions

View File

@ -2,22 +2,22 @@ kind: pipeline
name: default name: default
steps: steps:
- name: linter - name: 执行代码检查
image: golang:latest image: golang:latest
commands: commands:
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint - go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
- golangci-lint run - golangci-lint run
- name: build - name: 编译x86_64平台二进制文件
image: golang:latest image: golang:latest
environment: environment:
GOOS: linux GOOS: linux
GOARCH: amd64 GOARCH: amd64
CGO_ENABLED: 0 CGO_ENABLED: 0
commands: commands:
- go build -o demo-app - go build -o go-app
- name: docker - name: 打包Docker镜像并推送
image: plugins/docker image: plugins/docker
settings: settings:
registry: docker.gitee.ltd registry: docker.gitee.ltd
@ -31,3 +31,10 @@ steps:
when: when:
event: push event: push
branch: master branch: master
- name: 发送电报通知消息
image: appleboy/drone-telegram
settings:
token: 883905265:AAFv3NAH4ykdh2m_XiQUuyKNJ9XE5RV7ukU
to: 365042238
message: 项目构建成功

View File

@ -11,7 +11,7 @@ RUN mkdir -p /app && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /et
WORKDIR /app WORKDIR /app
COPY demo-app ./ COPY go-app ./
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai
EXPOSE 8080 EXPOSE 8080