logginghandler/.drone.yml
Marvin Preuss bc05c16a44
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
ci: fixes install-tools references
2022-01-20 13:16:16 +01:00

84 lines
1.2 KiB
YAML

kind: pipeline
name: default
type: docker
golang-image: &golang-image golang:1.17-alpine
gobin-volume: &gobin-volume
name: gobin
path: /go/bin
usr-volume: &usr-volume
name: usr
path: /usr
deps-command: &deps-command apk add build-base git
steps:
- name: tags
image: alpine/git
commands:
- git fetch --tags
- name: install-deps
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- *deps-command
- name: lint
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make lint
depends_on:
- tags
- install-deps
- name: test
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make test
depends_on:
- install-deps
- tags
- lint
- name: build
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make build
depends_on:
- tags
- lint
- test
- install-deps
when:
event:
exclude:
- tag
- name: release
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- make release
depends_on:
- test
- lint
- tags
- install-deps
when:
event:
- tag
volumes:
- name: gobin
temp: {}
- name: usr
temp: {}