问题: - notify-wechat-success 缺少依赖,导致过早执行 - chmod 命令在容器中可能失败 修复: 1. notify-wechat-success: 添加 depends_on: archive-to-main 2. notify-wechat-failure: 添加 depends_on: deploy-production 3. 使用 'sh scripts/notify-wechat.sh' 替代 chmod +x 后执行 确保通知在所有步骤完成后才执行
This commit is contained in:
+6
-4
@@ -371,9 +371,10 @@ steps:
|
||||
environment:
|
||||
WECHAT_WEBHOOK:
|
||||
from_secret: wechat_webhook
|
||||
depends_on:
|
||||
- archive-to-main
|
||||
commands:
|
||||
- chmod +x scripts/notify-wechat.sh
|
||||
- WECHAT_WEBHOOK="$WECHAT_WEBHOOK" ./scripts/notify-wechat.sh success
|
||||
- sh scripts/notify-wechat.sh success
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
@@ -388,9 +389,10 @@ steps:
|
||||
environment:
|
||||
WECHAT_WEBHOOK:
|
||||
from_secret: wechat_webhook
|
||||
depends_on:
|
||||
- deploy-production
|
||||
commands:
|
||||
- chmod +x scripts/notify-wechat.sh
|
||||
- WECHAT_WEBHOOK="$WECHAT_WEBHOOK" ./scripts/notify-wechat.sh failure
|
||||
- sh scripts/notify-wechat.sh failure
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
|
||||
Reference in New Issue
Block a user