问题: - 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:
|
environment:
|
||||||
WECHAT_WEBHOOK:
|
WECHAT_WEBHOOK:
|
||||||
from_secret: wechat_webhook
|
from_secret: wechat_webhook
|
||||||
|
depends_on:
|
||||||
|
- archive-to-main
|
||||||
commands:
|
commands:
|
||||||
- chmod +x scripts/notify-wechat.sh
|
- sh scripts/notify-wechat.sh success
|
||||||
- WECHAT_WEBHOOK="$WECHAT_WEBHOOK" ./scripts/notify-wechat.sh success
|
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@@ -388,9 +389,10 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
WECHAT_WEBHOOK:
|
WECHAT_WEBHOOK:
|
||||||
from_secret: wechat_webhook
|
from_secret: wechat_webhook
|
||||||
|
depends_on:
|
||||||
|
- deploy-production
|
||||||
commands:
|
commands:
|
||||||
- chmod +x scripts/notify-wechat.sh
|
- sh scripts/notify-wechat.sh failure
|
||||||
- WECHAT_WEBHOOK="$WECHAT_WEBHOOK" ./scripts/notify-wechat.sh failure
|
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|||||||
Reference in New Issue
Block a user