Files
syncdb/.drone.yml
T
曾志威 c12915bc25
continuous-integration/drone/push Build is failing
init
2026-09-18 17:08:54 +08:00

35 lines
693 B
YAML

kind: pipeline
type: docker
name: build
clone:
depth: 1
steps:
- name: test
image: golang:1.23-alpine
commands:
- gofmt -d .
- go test ./...
- name: build
image: golang:1.23-alpine
environment:
CGO_ENABLED: 0
commands:
- mkdir -p dist
- go build -trimpath -ldflags="-s -w" -o dist/syncdb ./cmd/syncdb
- GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/syncdb.exe ./cmd/syncdb
- name: docker
image: plugins/docker
settings:
repo: ${DRONE_REPO}
username:
from_secret: registry_username
password:
from_secret: registry_password
when:
event:
- tag