-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
84 lines (70 loc) · 1.52 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
76
77
78
79
80
81
82
83
84
---
kind: pipeline
name: default
clone:
depth: 50
steps:
- name: eslint
image: marcbachmann/eslint:8.0.1
environment:
GH_TOKEN:
from_secret: GH_TOKEN
- name: docker
image: livingdocs/docker-node:22-16
volumes:
- name: dockersocket
path: /var/run/docker.sock
environment:
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
commands:
- |
docker-login
SHA_TAG=livingdocs/semantic-release:sha-$DRONE_COMMIT_SHA
docker build -t $SHA_TAG .
docker push $SHA_TAG
echo -----------------
echo Docker Tag: $SHA_TAG
echo -----------------
- name: release
image: livingdocs/semantic-release:sha-${DRONE_COMMIT_SHA}
environment:
GH_TOKEN:
from_secret: GH_TOKEN
volumes:
- name: dockersocket
host:
path: /var/run/docker.sock
trigger:
event: [push]
---
kind: pipeline
name: docker-release
clone:
disable: true
steps:
- name: tag
image: livingdocs/docker-node:22-16
volumes:
- name: dockersocket
path: /var/run/docker.sock
environment:
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
commands:
- docker-login
- regctl image cp livingdocs/semantic-release:sha-$DRONE_COMMIT_SHA livingdocs/semantic-release:$DRONE_TAG
volumes:
- name: dockersocket
host:
path: /var/run/docker.sock
trigger:
event: [tag]
---
kind: signature
hmac: 7d537173eb3c82757c9eeac830b45c7d36ab6b5faeee2339c05b7afeb763775c
...