add ci
This commit is contained in:
29
.drone.yml
Normal file
29
.drone.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: golang:alpine
|
||||
environment:
|
||||
GOPROXY: goproxy.cn
|
||||
LDFLAGS: -w -s
|
||||
volumes:
|
||||
- name: deps
|
||||
path: /go
|
||||
commands:
|
||||
- printenv
|
||||
- go build -ldflags "$LDFLAGS -X 'main.build=$DRONE_BUILD_NUMBER'" -v
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: DOCKER_USERNAME
|
||||
password:
|
||||
from_secret: DOCKER_PASSWORD
|
||||
registry: hub.dragonfly.fun
|
||||
repo: hub.dragonfly.fun/demo/wiki
|
||||
|
||||
volumes:
|
||||
- name: deps
|
||||
path: /opt/src/go
|
||||
Reference in New Issue
Block a user