This repository has been archived on 2023-08-29. You can view files and clone it, but cannot push or open issues or pull requests.
automation/.drone.yml
Dreaded_X 7d86b83335
All checks were successful
continuous-integration/drone/push Build is passing
Tag docker image as automation
2022-01-24 22:01:21 +01:00

48 lines
1.1 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build
image: docker
volumes:
- name: socket
path: /var/run/docker.sock
commands:
- docker build -t automation .
- name: deploy
image: docker
volumes:
- name: socket
path: /var/run/docker.sock
environment:
MQTT_HOST:
from_secret: MQTT_HOST
MQTT_PORT:
from_secret: MQTT_PORT
MQTT_USER:
from_secret: MQTT_USER
MQTT_PASS:
from_secret: MQTT_PASS
HUE_BRIDGE:
from_secret: HUE_BRIDGE
commands:
- docker stop automation || true
- docker rm automation || true
- docker run -e MQTT_HOST=$MQTT_HOST -e MQTT_PORT=$MQTT_PORT -e MQTT_USER=$MQTT_USER -e MQTT_PASS=$MQTT_PASS -e HUE_BRIDGE=$HUE_BRIDGE --network mqtt --name automation -d automation
when:
branch:
- master
event:
exclude:
- pull_request
volumes:
- name: socket
host:
path: /var/run/docker.sock