-
Notifications
You must be signed in to change notification settings - Fork 14
/
.drone.yml
71 lines (61 loc) · 1.31 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
---
kind: pipeline
type: kubernetes
name: CICD
platform:
os: linux
arch: arm64
workspace:
path: /drone/src
trigger:
ref:
- refs/tags/**
- refs/heads/**
event:
exclude:
- promote
branch:
exclude:
- test
steps:
- name: lint
image_pull_secrets:
- dockerconfig
image: ccr.ccs.tencentyun.com/ruilisi/xiemala-build-base:1.18
commands:
- go get
- make lint
environment:
GOPROXY: https://goproxy.cn,direct
- name: test-models
image: ccr.ccs.tencentyun.com/ruilisi-pub/golang-ci:1.16
commands:
- make test-models
environment:
GOPROXY: https://goproxy.cn,direct
---
kind: pipeline
type: kubernetes
name: sync-to-github
platform:
os: linux
arch: arm64
workspace:
path: /drone/src
trigger:
ref:
- refs/heads/master
event:
exclude:
- promote
steps:
- name: sync commit
image: alpine/git
environment:
SSH_KEY:
from_secret: github_ssh_key
commands:
- mkdir -p /root/.ssh/ && echo $SSH_KEY | base64 -d > /root/.ssh/id_rsa && chmod 600 /root/.ssh/id_rsa
- ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts && chmod 600 /root/.ssh/known_hosts
- git remote add github git@github.com:ruilisi/css-checker.git
- git push github ${branch:-${DRONE_BRANCH}} --force