-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
75 lines (70 loc) · 1.7 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
75
---
kind: pipeline
type: kubernetes
name: apollo
__dind_orb: &dind
image: hub.getbetter.ro/orbs/dind:blue
pull: always
volumes:
- name: dockersock
path: /var/run
__rust_orb: &rust
image: hub.getbetter.ro/orbs/rust:green
pull: always
volumes:
- name: dockersock
path: /var/run
environment:
SCCACHE_CREDS:
from_secret: sccache-creds
steps:
- name: just-ci
<<: *rust
commands:
- /with-ci.sh just ci
- name: docker-daemon
<<: *dind
privileged: true
detach: true
when:
ref:
- refs/tags/*
- refs/heads/ci
- name: just-cross
<<: *rust
depends_on: [ "just-ci" ]
when:
ref:
- refs/tags/*
- refs/heads/ci
commands:
- while ! curl -s --unix-socket /var/run/docker.sock http://localhost/; do sleep 1; done
- /with-ci.sh config_only just cross
- mv target/x86_64-unknown-linux-musl/release/loglux loglux.x86_64-unknown-linux-musl
- ./loglux.x86_64-unknown-linux-musl --help
- name: create-gitea-release
<<: *dind
depends_on: [ "just-cross" ]
when:
ref:
- refs/tags/*
- refs/heads/ci
environment:
TEA_TOKEN:
from_secret: tea-token
commands:
- tea login add --name getbetter --url gitea.getbetter.ro --token "$TEA_TOKEN"
- export TAG_NAME=$(echo $CI_COMMIT_REF | cut -d"/" -f3-)
- git fetch --tags -q
- |
tea releases create --tag $TAG_NAME --title $TAG_NAME --note "$(git-cliff --latest --strip all)" \
--asset loglux.x86_64-unknown-linux-musl
trigger:
ref:
- refs/tags/*
- refs/heads/main
- refs/heads/ci
- refs/heads/renovate/*
volumes:
- name: dockersock
temp: { }