-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.yml
74 lines (67 loc) · 1.32 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
kind: pipeline
name: default
type: docker
steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags
- name: lint
image: golangci/golangci-lint:v1.31.0-alpine
commands:
- apk add --no-cache make
- make lint
- name: test
image: golang
pull: always
commands:
- make test
- name: build
image: goreleaser/goreleaser
commands:
- make build
depends_on:
- test
- lint
when:
event:
exclude:
- tag
- name: release
image: golang:alpine
volumes:
- name: dockersock
path: /var/run
environment:
GITEA_TOKEN:
from_secret: gitea_token
DOCKER_USERNAME:
from_secret: username
DOCKER_PASSWORD:
from_secret: password
DOCKER_REGISTRY: quay.io
commands:
- sleep 5
- apk add --no-cache bash curl docker git
- >
echo "$DOCKER_PASSWORD" |
docker login -u $DOCKER_USERNAME --password-stdin $DOCKER_REGISTRY
- curl -sL https://git.io/goreleaser | bash
depends_on:
- test
- lint
when:
event: tag
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
when:
event: tag
volumes:
- name: dockersock
temp: {}