From cd8e77c1f6e09678d45ab4f22eacc1ff36497e0f Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Aug 2026 18:58:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20deploy-staging=20=E5=85=A8=E6=A0=88?= =?UTF-8?q?=20push=20=E8=A2=AB=E9=94=99=E8=AF=AF=20skip=E2=80=94=E2=80=94s?= =?UTF-8?q?uccess()=20=E6=94=B9=20!cancelled()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题:retag-staging-skipped 在全栈 push 时所有矩阵项都被 skipped(因为都有对应 build), success() 认为 skipped 不满足条件,导致 deploy-staging 被跳过。 修复:success() → !cancelled(),允许 skipped 依赖不阻塞 deploy。 删除两行误导性注释(声称 success() 不阻塞 skipped,实际恰恰相反)。 安全兜底:build-staging 真正失败时 workflow 会 cancel,!cancelled() 仍会阻止 deploy。 --- .gitea/workflows/ci-pipeline.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitea/workflows/ci-pipeline.yml b/.gitea/workflows/ci-pipeline.yml index 9f1a2c5a3..2ccfecc2f 100755 --- a/.gitea/workflows/ci-pipeline.yml +++ b/.gitea/workflows/ci-pipeline.yml @@ -1145,9 +1145,7 @@ jobs: - check-push-paths - build-staging - retag-staging-skipped - # 显式 success() 状态检查:上游 build/retag 被路径过滤 if 跳过(skipped)时不阻塞本 job; - # 上游真正失败时仍然阻断(act_runner 对无状态函数的 if 隐式包 success(),纯 skipped 也会连带跳过) - if: success() && github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'develop') + if: (!cancelled()) && github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'develop') steps: - name: Checkout code shell: sh -- 2.54.0