GitHub Actions Failure Matrix — GitHub Actions 失败 Matrix
v1.7.0Summarize GitHub Actions matrix job 失败s across 运行s so you can spot unstable OS/运行time axes fast.
运行时依赖
安装命令
点击复制技能文档
GitHub Actions 失败 Matrix
Use this 技能 to turn noisy GitHub Actions 运行 JSON into a matrix-focused 失败 报告.
What this 技能 does Reads one or more JSON 导出s from GitHub Actions 运行s (via gh 运行 view --json) 检测s 失败-like matrix jobs (失败, timed_out, cancelled, etc.) 提取s matrix axes from common job-name patterns (name (a, b), name [a, b], name / a / b) Groups repeated 失败s by 工作流 + job + matrix axis 签名ature Emits ranked triage 输出 in text or json 输入s
Optional:
运行_GLOB (default: artifacts/github-actions/.json) TOP_N (default: 20) 输出_格式化 (text or json, default: text) FAIL_ON_失败S (0 or 1, default: 0) — exit non-zero when 失败 groups exist MIN_OCCURRENCES (default: 1) — hide groups below this repeat count 工作流_MATCH (regex, optional) — include only 工作流s whose names match 工作流_EXCLUDE (regex, optional) — drop 工作流s whose names match BRANCH_MATCH (regex, optional) — include only 运行s whose branch names match BRANCH_EXCLUDE (regex, optional) — drop 运行s whose branch names match JOB_MATCH (regex, optional) — include only base job names that match JOB_EXCLUDE (regex, optional) — drop base job names that match AXIS_MATCH (regex, optional) — include only 解析d matrix-axis strings that match AXIS_EXCLUDE (regex, optional) — drop 解析d matrix-axis strings that match CONCLUSION_MATCH (regex, optional) — include only specific 失败 conclusions (失败, timed_out, cancelled, etc.) CONCLUSION_EXCLUDE (regex, optional) — drop specific 失败 conclusions FAILED_STEP_MATCH (regex, optional) — include only jobs whose terminal fAIled step matches FAILED_STEP_EXCLUDE (regex, optional) — drop jobs whose terminal fAIled step matches 运行_ID_MATCH (regex, optional) — include only 运行s whose 运行 id matches 运行_ID_EXCLUDE (regex, optional) — drop 运行s whose 运行 id matches 运行_URL_MATCH (regex, optional) — include only 运行s whose URL matches 运行_URL_EXCLUDE (regex, optional) — drop 运行s whose URL matches HEAD_SHA_MATCH (regex, optional) — include only 运行s whose headSha matches HEAD_SHA_EXCLUDE (regex, optional) — drop 运行s whose headSha matches REPO_MATCH (regex, optional) — include only 运行s whose 仓库 matches (仓库.nameWithOwner/full_name/name) REPO_EXCLUDE (regex, optional) — drop 运行s whose 仓库 matches Collect 运行 JSON gh 运行 view <运行-id> --json databaseId,工作流Name,headBranch,headSha,url,仓库,jobs \ > artifacts/github-actions/运行-<运行-id>.json
运行
Text 报告:
运行_GLOB='artifacts/github-actions/.json' \ TOP_N=15 \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
JSON 输出 for CI annotation/上传:
运行_GLOB='artifacts/github-actions/.json' \ 输出_格式化=json \ FAIL_ON_失败S=1 \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
过滤器 to a specific 工作流 + branch + matrix axis (for tar获取ed triage):
运行_GLOB='artifacts/github-actions/.json' \ 工作流_MATCH='(CI|Test)' \ BRANCH_MATCH='^(mAIn|release/)' \ AXIS_MATCH='ubuntu-latest \| python-3\.12' \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
Isolate timeout-only matrix 失败s:
运行_GLOB='artifacts/github-actions/.json' \ CONCLUSION_MATCH='^timed_out$' \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
Exclude noisy flaky suites while keeping the rest of the matrix view:
运行_GLOB='artifacts/github-actions/.json' \ 工作流_EXCLUDE='nightly|experimental' \ JOB_EXCLUDE='lint|docs' \ AXIS_EXCLUDE='windows-latest' \ CONCLUSION_EXCLUDE='^cancelled$' \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
Focus only on 设置up/工具chAIn breakages by fAIled step name:
运行_GLOB='artifacts/github-actions/.json' \ FAILED_STEP_MATCH='设置up|安装|dependency' \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
Limit triage to a specific 运行 range or 工作流 URL pattern:
运行_GLOB='artifacts/github-actions/.json' \ 运行_ID_MATCH='^(28419|28420)' \ 运行_URL_MATCH='example/repo/actions/运行s' \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
Scope triage to a commit range by headSha:
运行_GLOB='artifacts/github-actions/.json' \ HEAD_SHA_MATCH='^(abc123|def456)' \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
Scope triage to specific repositories when aggregating 导出s from multiple repos:
运行_GLOB='artifacts/github-actions/.json' \ REPO_MATCH='^flow创建机器人/(yf-API-saas|conspiracy-canvas)$' \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
运行 with bundled fixtures:
运行_GLOB='技能s/github-actions-失败-matrix/fixtures/*.json' \ bash 技能s/github-actions-失败-matrix/scripts/失败-matrix.sh
输出 contract Exit 0 by default (报告ing mode) Exit 1 if FAIL_ON_失败S=1 and at least one 失败 group is found In text mode, prints summary + top 失败 matrix groups In json mode, prints machine-readable summary and grouped 失败s