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 32f3d013f8
All checks were successful
continuous-integration/drone/push Build is passing
Fixed Dockerfile and build script
2022-11-16 05:33:09 +01:00

49 lines
1.2 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_PASSWORD:
from_secret: MQTT_PASSWORD
HUE_TOKEN:
from_secret: HUE_TOKEN
NTFY_TOPIC:
from_secret: NTFY_TOPIC
GOOGLE_CREDENTIALS:
from_secret: GOOGLE_CREDENTIALS
commands:
- docker stop automation || true
- docker rm automation || true
- docker create -e MQTT_PASSWORD=$MQTT_PASSWORD -e HUE_TOKEN=$HUE_TOKEN -e NTFY_TOPIC=$NTFY_TOPIC -e GOOGLE_CREDENTIALS=$GOOGLE_CREDENTIALS --network mqtt --name automation automation
- docker network connect mqtt automation
- docker network connect web automation
- docker start automation
when:
branch:
- master
event:
exclude:
- pull_request
volumes:
- name: socket
host:
path: /var/run/docker.sock