This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.drone.yml
74 lines (74 loc) · 1.73 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
type: kubernetes
name: terraform-provider-gitea
platform:
os: linux
arch: amd64
steps:
- name: fetch
image: docker:git
commands:
- git fetch --tags
when:
event:
- push
- pull_request
- tag
- name: build-dev
image: golang:1.18.3-alpine3.16
commands:
- "apk add --update --no-cache make"
- "make build"
when:
event:
- push
resources:
limits:
cpu: 1000
memory: 1024MiB
- name: build
image: goreleaser/goreleaser
commands:
- curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin v0.64.0
- goreleaser build --snapshot
when:
event:
- pull_request
resources:
limits:
cpu: 1000
memory: 1024MiB
- name: test
image: golang:1.18.3-alpine3.16
commands:
- "apk add --update --no-cache make build-base"
- "make test"
when:
event:
- push
- pull_request
- name: release
image: goreleaser/goreleaser
environment:
GITEA_TOKEN:
from_secret: gitea_token
GPG_PRIVATE_KEY:
from_secret: GPG_PRIVATE_KEY
GPG_FINGERPRINT:
from_secret: GPG_FINGERPRINT
GPG_PRIVATE_KEY_BASE64:
from_secret: GPG_PRIVATE_KEY_BASE64
commands:
- curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin v0.64.0
- apk add gpg-agent
- gpg-agent --daemon --default-cache-ttl 7200
- echo $GPG_PRIVATE_KEY_BASE64 | base64 -d | gpg --import --batch --no-tty
- goreleaser release
resources:
limits:
cpu: 1000
memory: 1024MiB
when:
event:
- tag