about summary refs log tree commit diff
path: root/.drone.yml
diff options
context:
space:
mode:
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.drone.yml b/.drone.yml
index 20a4419..a6ec275 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -21,3 +21,36 @@ steps:
   commands:
   - go test -coverprofile=cover.out
   - go tool cover -func=cover.out
+
+- name: telegram-notification
+  image: appleboy/drone-telegram
+  settings:
+    token: 
+      from_secret: telegram_token
+    to: 
+      from_secret: telegram_to
+    when:
+      status: [ success, failure ]
+    format: markdown
+    message: >
+      {{#success build.status}}
+      ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.
+
+      📝 Commit by {{commit.author}} on `{{commit.branch}}`:
+
+      ```
+      {{commit.message}}
+      ```
+
+      🌐 {{ build.link }}
+      {{else}}
+      ❌ Build #{{build.number}} of `{{repo.name}}` failed.
+
+      📝 Commit by {{commit.author}} on `{{commit.branch}}`:
+
+      ```
+      {{commit.message}}
+      ```
+
+      🌐 {{ build.link }}
+      {{/success}}