36 lines
719 B
YAML
36 lines
719 B
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: main
|
|
|
|
steps:
|
|
- name: build
|
|
image: docker:latest
|
|
volumes:
|
|
- name: docker-socket
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- docker build -t registry.drone/minebot:latest .
|
|
when:
|
|
branch:
|
|
- master
|
|
|
|
- name: deploy
|
|
image: docker:latest
|
|
volumes:
|
|
- name: docker-socket
|
|
path: /var/run/docker.sock
|
|
environment:
|
|
REGISTRY_PWD:
|
|
from_secret: registry_pwd
|
|
commands:
|
|
- echo $REGISTRY_PWD | docker login -u drone --password-stdin
|
|
- docker push registry.drone/minebot:latest
|
|
when:
|
|
branch:
|
|
- master
|
|
|
|
volumes:
|
|
- name: docker-socket
|
|
host:
|
|
path: /var/run/docker.sock |