forked from jlesage/docker-firefox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
86 lines (78 loc) · 1.81 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
85
86
#
# Drone pipeline to build Docker image.
#
kind: pipeline
type: docker
name: default
steps:
- name: build-only
image: plugins/docker
settings:
repo: ${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME##docker-}
build_args:
- DOCKER_IMAGE_VERSION=drone-ci
dry_run: true
when:
ref:
exclude:
- refs/tags/v*
- name: set-docker-tags
image: alpine
commands:
# Always tag the Docker image with the Git tag (i.e. vX.Y.Z).
- printf "${DRONE_TAG}" >> .tags
# Tag the Docker image with with 'latest' only if not a prerelease.
- printf "${DRONE_TAG}" | grep -q '-' || printf ",latest" >> .tags
when:
ref:
- refs/tags/v*
- name: build-and-push
image: plugins/docker
settings:
repo: ${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME##docker-}
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
build_args:
- DOCKER_IMAGE_VERSION=${DRONE_TAG:1}
when:
ref:
- refs/tags/v*
- name: push-dockerhub-readme
image: jlesage/drone-push-readme
settings:
repo: ${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME##docker-}
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
readme: DOCKERHUB.md
when:
ref:
- refs/tags/v*
- name: microbadger
image: plugins/webhook
settings:
urls:
from_secret: microbadger_webhook
failure: ignore
when:
ref:
- refs/tags/v*
- name: notification
image: plugins/pushover
settings:
message: "{{ repo.owner }}/{{ repo.name }}#{{ truncate build.commit 8 }} ({{ build.branch }}) by {{ build.author }} - {{ build.message }}"
token:
from_secret: pushover_token
user:
from_secret: pushover_user
failure: ignore
when:
event:
exclude:
- pull_request
status:
- success
- failure