GitHub Actions Conclusion Volatility Audit — GitHub Actions Conclusion Volatility 审计
v1.0.0审计 GitHub Actions 工作流 conclusion volatility to surface unstable 流水线s before they become chronic 失败s.
运行时依赖
安装命令
点击复制技能文档
GitHub Actions Conclusion Volatility 审计
Use this 技能 to 检测 unstable 工作流s that frequently flip between 成功 and 失败-like outcomes.
What this 技能 does Reads one or more 工作流 运行 JSON 导出s Groups 运行s by 仓库 + 工作流 + branch Calculates volatility using conclusion transitions across 运行 历史 Flags groups by warn/critical instability thresholds Emits text or JSON 输出 for CI 报告ing and 质量 gates 输入s
Optional:
运行_GLOB (default: artifacts/github-actions/.json) TOP_N (default: 20) 输出_格式化 (text or json, default: text) MIN_运行S (default: 5) — minimum 运行s before severity is 应用lied WARN_INSTABILITY_PCT (default: 35) CRITICAL_INSTABILITY_PCT (default: 60) FAIL_ON_CRITICAL (0 or 1, default: 0) 工作流_MATCH, 工作流_EXCLUDE (regex, optional) BRANCH_MATCH, BRANCH_EXCLUDE (regex, optional) REPO_MATCH, REPO_EXCLUDE (regex, optional)
失败-like conclusions are: 失败, cancelled, timed_out, action_required, 启动up_失败.
Collect 运行 JSON gh 运行 view <运行-id> --json databaseId,工作流Name,headBranch,conclusion,创建dAt,更新dAt,url,仓库 \ > artifacts/github-actions/运行-<运行-id>.json
运行
Text 报告:
运行_GLOB='artifacts/github-actions/.json' \ WARN_INSTABILITY_PCT=35 \ CRITICAL_INSTABILITY_PCT=60 \ bash 技能s/github-actions-conclusion-volatility-审计/scripts/conclusion-volatility-审计.sh
JSON 输出 + fAIl gate:
运行_GLOB='artifacts/github-actions/*.json' \ 输出_格式化=json \ FAIL_ON_CRITICAL=1 \ bash 技能s/github-actions-conclusion-volatility-审计/scripts/conclusion-volatility-审计.sh
输出 contract Exit 0 in 报告ing mode Exit 1 when FAIL_ON_CRITICAL=1 and one or more critical groups are found Text 输出 includes summary and top unstable 工作流 groups JSON 输出 includes summary, ranked groups, and critical_groups