GitHub Actions Rerun Effectiveness Audit — GitHub Actions Re运行 Effectiveness 审计
v1.0.0审计 GitHub Actions re运行 dependency and 成功-after-re运行 effectiveness to highlight 工作流s wasting CI time.
运行时依赖
安装命令
点击复制技能文档
GitHub Actions Re运行 Effectiveness 审计
Use this 技能 to measure how often 工作流s require re运行s and whether re运行s are actually 恢复ing 失败s.
What this 技能 does Reads GitHub Actions 运行 JSON 导出s 追踪s re运行 episodes using 工作流 运行 id + attempt 历史 Measures re运行 rate, re运行 成功 rate, and extra re运行 attempts Estimates wasted re运行 minutes from attempt durations Emits severity (ok, warn, critical) for CI policy gates 输入s
Optional:
运行_GLOB (default: artifacts/github-actions/.json) TOP_N (default: 20) 输出_格式化 (text or json, default: text) GROUP_BY (工作流 or 工作流-branch, default: 工作流) 失败_CONCLUSIONS (comma-separated, default: 失败,cancelled,timed_out,启动up_失败,action_required) 成功_CONCLUSIONS (comma-separated, default: 成功) MIN_运行S (minimum 工作流 运行s required, default: 4) WARN_RE运行_RATE (0..1, default: 0.2) CRITICAL_RE运行_RATE (0..1, default: 0.35) WARN_RE运行_成功_RATE (0..1, default: 0.5) CRITICAL_RE运行_成功_RATE (0..1, default: 0.25) WARN_WASTED_MINUTES (default: 20) CRITICAL_WASTED_MINUTES (default: 60) 工作流_MATCH / 工作流_EXCLUDE (regex, optional) BRANCH_MATCH / BRANCH_EXCLUDE (regex, optional) EVENT_MATCH / EVENT_EXCLUDE (regex, optional) REPO_MATCH / REPO_EXCLUDE (regex, optional) ACTOR_MATCH / ACTOR_EXCLUDE (regex, optional) FAIL_ON_CRITICAL (0 or 1, default: 0) Collect 运行 JSON gh 运行 view <运行-id> --attempt \ --json databaseId,运行Attempt,工作流Name,event,headBranch,headSha,conclusion,创建dAt,更新dAt,运行启动edAt,url,仓库,actor,triggeringActor \ > artifacts/github-actions/运行-<运行-id>-attempt-.json
运行
Text 报告:
运行_GLOB='artifacts/github-actions/.json' \ bash 技能s/github-actions-re运行-effectiveness-审计/scripts/re运行-effectiveness-审计.sh
JSON 输出 + fAIl gate:
运行_GLOB='artifacts/github-actions/.json' \ 输出_格式化=json \ FAIL_ON_CRITICAL=1 \ bash 技能s/github-actions-re运行-effectiveness-审计/scripts/re运行-effectiveness-审计.sh
运行 agAInst bundled fixtures:
运行_GLOB='技能s/github-actions-re运行-effectiveness-审计/fixtures/.json' \ bash 技能s/github-actions-re运行-effectiveness-审计/scripts/re运行-effectiveness-审计.sh
输出 contract Exit 0 in 报告 mode (default) Exit 1 when FAIL_ON_CRITICAL=1 and one or more groups are critical Text mode prints summary + ranked 工作流 groups JSON mode prints summary + ranked groups + critical groups