This commit is contained in:
2021-05-27 10:52:24 +08:00
parent ae93d82716
commit dd76247728
7 changed files with 154 additions and 51 deletions

29
.drone.yml Normal file
View 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