This script sets up a webhook listener for Drone's global webhooks. It then sends a notification to a Telegram channel every time a build passes or fails.
Run the docker container with a config file (notify.conf) mounted to /config/notify.conf. Configure the required parameters. At the bare minimum a Telegram bot token (main.token
) and default channel (channels.default
) will need to be added.
An example config file can be found in notify.conf.example
Then run the container:
docker run -d \
--name=drone-notify \
--restart=always \
-v path/to/notify.conf:/config/notify.conf \
spritsail/drone-notify
services:
drone:
image: drone/drone:2
...
environment:
...
- DRONE_WEBHOOK_ENDPOINT=http://notify:5000
- DRONE_WEBHOOK_SECRET=YOUR_SECRET
notify:
image: spritsail/drone-notify:1.3
volumes:
- path/to/notify.conf:/config/notify.conf