From ed985bb930843bb20cfa19b4a3a530249c07dcca Mon Sep 17 00:00:00 2001 From: Moh Dzulfikri Maulana <106526316+Dzuuul@users.noreply.github.com> Date: Tue, 10 Mar 2026 13:32:50 +0700 Subject: [PATCH] refactor: streamline Telegram deployment notifications by replacing the dedicated notification step with an inline curl command and updating the message content. --- .woodpecker.yml | 42 +++++------------------------------------- 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 5db960a..1a71f88 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -37,43 +37,11 @@ steps: - docker compose up -d --remove-orphans - docker image prune -f - > - curl -X POST "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage" - -d "chat_id=${TELEGRAM_CHAT_ID}" - -d "message_thread_id=8" - -d "parse_mode=HTML" - -d "text=🚀 Deployment Success!%0AProject: fullstack-portfolio%0AStatus: Finished" + curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage" + -d "chat_id=${TELEGRAM_CHAT_ID}" + -d "message_thread_id=8" + -d "parse_mode=HTML" + -d "text=✅ Deployment Success!%0AProject: portfolio%0AStatus: Finished" when: branch: master event: push - -# 3.Telegram Notification - notify-telegram: - image: appleboy/drone-telegram:1.3.9 - settings: - token: - from_secret: telegram_token - to: - from_secret: telegram_chat_id - message_thread_id: 8 - format: html - message: | - {{#success build.status}} - ✅ Deployment SUCCESS - {{else}} - ❌ Deployment FAILED - {{/success}} - - 📦 Project: {{ repo.name }} - - 📝 Commit: - {{ commit.message }} - - 👤 Author: {{ commit.author }} - - 🛠 Build Details: - ⏱ Duration: {{ build.duration }}s - 🔗 View Full Logs - when: - - event: [push] - branch: master - status: [ success, failure ] \ No newline at end of file