From c92b26e436ef81279f3e8b59a55c34b83ae980c4 Mon Sep 17 00:00:00 2001 From: clay Date: Sun, 13 Apr 2025 14:37:17 +0800 Subject: [PATCH] feat: 1 --- .drone.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6b531e9..b433fe8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,6 +49,9 @@ steps: - name: notify image: 10.7.127.190:38080/plugins/webhook:latest + environment: + WEBHOOK_URL: + from_secret: wechat_webhook_url when: status: [ success,failure ] settings: @@ -56,16 +59,18 @@ steps: content_type: application/json template: | { - "msgtype": "news", - "news": { - "articles": [ - { - "title": "{{repo.owner}}/{{repo.name}} 构建通知 ({{build.status}})", - "description": "{{#success build.status}}成功{{else}}失败{{/success}} | 分支: {{build.branch}} | 提交: {{build.commit}}", - "url": "{{build.link}}", - "picurl": "${DRONE_COMMIT_AUTHOR_AVATAR}" - } - ] + "msgtype": "markdown", + "markdown": { + "content": "{{#success build.status}}✅ 构建成功{{else}}❌ 构建失败{{/success}}\n\n + **📦 项目**: {{repo.owner}}/{{repo.name}} \n + **🔢 构建号**: #{{build.number}} \n + **🌿 分支**: {{build.branch}} \n + **🆔 提交标识**: `{{build.commit}}` \n + **👤 提交者**: {{build.author}} \n + **📝 提交信息**: {{build.message}} \n + **⏱️ 持续时间**: {{build.duration}}秒 \n\n + {{^success build.status}}**📜 失败日志**: [点击查看]({{build.link}}/logs) \n{{/success}} + [📊 查看详情]({{build.link}})" } }