From 78f69328f8ed3b098350d12064c6ac52e2358a44 Mon Sep 17 00:00:00 2001 From: Ching Date: Tue, 5 Mar 2024 00:58:05 +0800 Subject: [PATCH] ci: Update Discord notification message format --- .drone.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8e33528..dae11f2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -53,9 +53,16 @@ steps: - name: discord notification image: appleboy/drone-discord settings: - webhook_id: discord_webhook_id - webhook_token: discord_webhook_token - message: "{{#success build.status}}🟢{{else}}🔴{{/success}} Repo: `[{{repo.name}}/{{commit.branch}}]` triggered by event `[{{uppercase build.event}}]` for build.\n - Commit [[{{commit.sha}}]({{commit.link}})]\n - Author `[{{commit.author}} / {{commit.email}}]`\n - Message: {{commit.message}} - Drone build [[#{{build.number}}]({{build.link}})] reported `[{{uppercase build.status}}]` at `[{{datetime build.finished \"2006.01.02 15:04\" \"\"}}]`\n" + webhook_id: + from_secret: discord_webhook_id + webhook_token: + from_secret: discord_webhook_token + message: | + Drone Build #${DRONE_BUILD_NUMBER} ${DRONE_BUILD_STATUS} + Project: ${DRONE_REPO_NAME} + Branch: ${DRONE_BRANCH} + Commit: ${DRONE_COMMIT_SHA:0:8} + [Build Log](${DRONE_BUILD_LINK}) when: status: [success, failure]