-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.star
32 lines (31 loc) · 1005 Bytes
/
.drone.star
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
# Automatically builds docker images and pushes them to the registry.
# Required drone secrets:
# - docker_repo eg. 'joellinn/php'
# - docker_username user with write permissions to repo
# - docker_password password of the user
def main(ctx):
return [
{
'kind': 'pipeline',
'type': 'docker',
'name': 'docker-hub',
'steps':
[
{
'name': 'build-push',
'image': 'plugins/docker',
'settings': {
'tags': ['latest'],
'repo': {'from_secret': 'docker_repo'},
'username': {'from_secret': 'docker_username'},
'password': {'from_secret': 'docker_password'},
},
},
],
'trigger':
{
'branch': ['master'],
'event': ['push']
},
},
]