diff --git a/.drone.yml b/.drone.yml index 0b2249d..07913fd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,13 +7,31 @@ steps: commands: - npm install - npm run build -steps: -- name: send telegram notification +- name: telegram notification image: appleboy/drone-telegram settings: - token: telegram_token - to: telegram_to - message_file: message_file.tpl - template_vars: - env: testing - app: MyApp \ No newline at end of file + token: + from_secret: telegram_token + to: + from_secret: telegram_to + format: markdown + when: + status: + - success + - failure + 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}} \ No newline at end of file