From 5cb5a2270b1b1cea91c71953bbfb8a477ad58e88 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Sat, 18 Apr 2026 15:08:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=A4=B1=E8=B4=A5=E6=97=B6=E7=9A=84=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用here document格式正确输出失败项目列表到GITHUB_OUTPUT - 添加EOF分隔符确保多行内容正确传递 - 在失败步骤中读取并显示具体的失败项目名称 - 保持原有的退出码设置确保工作流正确失败 --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae1e2f42..c62726a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,7 +188,14 @@ jobs: printf ' %s\n' "${failed_projects[@]}" fi - echo "failed=$failed" >> "$GITHUB_OUTPUT" + { + echo "failed=$failed" + echo "failed_projects<> "$GITHUB_OUTPUT" - name: Generate CTRF report run: | @@ -233,4 +240,9 @@ jobs: - name: Fail if any test project failed if: always() && steps.test_all_projects.outputs.failed == '1' - run: exit 1 + env: + FAILED_PROJECTS: ${{ steps.test_all_projects.outputs.failed_projects }} + run: | + echo "The following test projects returned non-zero exit codes:" + printf '%s\n' "$FAILED_PROJECTS" + exit 1