diff --git a/.drone.yml b/.drone.yml index 88a29f8..68d6a1c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,18 +9,18 @@ volumes: path: /usr/local/path/gopath steps: -# - name: golang-build -# image: golang -# volumes: -# - name: gopath -# path: /go -# commands: -# - export GOPROXY=https://goproxy.cn -# - go mod init test-drone -# - go mod tidy -# - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o test-drone -# when: -# target: [ "" ] + - name: golang-build + image: golang + volumes: + - name: gopath + path: /go + commands: + - export GOPROXY=https://goproxy.cn + - go mod init test-drone + - go mod tidy + - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o test-drone + when: + target: [ "test","pre" ] # - name: docker-push # image: plugins/docker