GitHub Actions Actor Reliability Audit
Use this skill to rank which actors (humans or bots) are associated with the least reliable GitHub Actions outcomes.
What this skill does
- - Reads GitHub Actions run JSON exports
- Groups runs by actor (optionally actor + workflow)
- Measures failure rate, failed-run volume, and latest failure streak per actor
- Scores severity (
ok, warn, critical) for triage and CI policy gates - Emits text or JSON output for automation
Inputs
Optional:
- -
RUN_GLOB (default: artifacts/github-actions/*.json) - INLINECODE5 (default:
20) - INLINECODE7 (
text or json, default: text) - INLINECODE11 (
actor or actor-workflow, default: actor) - INLINECODE15 (comma-separated, default:
failure,cancelled,timed_out,startup_failure) - INLINECODE17 (minimum runs required, default:
5) - INLINECODE19 (0..1, default:
0.25) - INLINECODE21 (0..1, default:
0.5) - INLINECODE23 (default:
4) - INLINECODE25 (default:
8) - INLINECODE27 (default:
2) - INLINECODE29 (default:
4) - INLINECODE31 /
ACTOR_EXCLUDE (regex, optional) - INLINECODE33 /
WORKFLOW_EXCLUDE (regex, optional) - INLINECODE35 /
BRANCH_EXCLUDE (regex, optional) - INLINECODE37 /
EVENT_EXCLUDE (regex, optional) - INLINECODE39 /
REPO_EXCLUDE (regex, optional) - INLINECODE41 (
0 or 1, default: 0)
Collect run JSON
CODEBLOCK0
Run
Text report:
CODEBLOCK1
JSON output + fail gate:
CODEBLOCK2
Run against bundled fixtures:
CODEBLOCK3
Output contract
- - Exit
0 in report mode (default) - Exit
1 when FAIL_ON_CRITICAL=1 and one or more actor groups are critical - Text mode prints summary + ranked actor groups
- JSON mode prints summary + ranked groups + critical groups
GitHub Actions 执行者可靠性审计
使用此技能来评估哪些执行者(人类或机器人)与最不可靠的 GitHub Actions 结果相关联。
此技能的功能
- - 读取 GitHub Actions 运行 JSON 导出文件
- 按执行者(可选:执行者 + 工作流)对运行进行分组
- 衡量每个执行者的失败率、失败运行数量以及最新连续失败次数
- 对严重程度进行评分(ok、warn、critical),用于分类和 CI 策略门控
- 输出文本或 JSON 格式结果,便于自动化处理
输入参数
可选参数:
- - RUNGLOB(默认值:artifacts/github-actions/*.json)
- TOPN(默认值:20)
- OUTPUTFORMAT(text 或 json,默认值:text)
- GROUPBY(actor 或 actor-workflow,默认值:actor)
- FAILURECONCLUSIONS(逗号分隔,默认值:failure,cancelled,timedout,startupfailure)
- MINRUNS(最低运行次数要求,默认值:5)
- WARNFAILURERATE(0..1,默认值:0.25)
- CRITICALFAILURERATE(0..1,默认值:0.5)
- WARNFAILEDRUNS(默认值:4)
- CRITICALFAILEDRUNS(默认值:8)
- WARNFAILURESTREAK(默认值:2)
- CRITICALFAILURESTREAK(默认值:4)
- ACTORMATCH / ACTOREXCLUDE(正则表达式,可选)
- WORKFLOWMATCH / WORKFLOWEXCLUDE(正则表达式,可选)
- BRANCHMATCH / BRANCHEXCLUDE(正则表达式,可选)
- EVENTMATCH / EVENTEXCLUDE(正则表达式,可选)
- REPOMATCH / REPOEXCLUDE(正则表达式,可选)
- FAILONCRITICAL(0 或 1,默认值:0)
收集运行 JSON
bash
gh run view --json databaseId,workflowName,event,headBranch,conclusion,createdAt,updatedAt,url,repository,actor,triggeringActor \
> artifacts/github-actions/run-.json
运行
文本报告:
bash
RUN_GLOB=artifacts/github-actions/*.json \
bash skills/github-actions-actor-reliability-audit/scripts/actor-reliability-audit.sh
JSON 输出 + 失败门控:
bash
RUN_GLOB=artifacts/github-actions/*.json \
OUTPUT_FORMAT=json \
FAILONCRITICAL=1 \
bash skills/github-actions-actor-reliability-audit/scripts/actor-reliability-audit.sh
针对捆绑的测试数据运行:
bash
RUN_GLOB=skills/github-actions-actor-reliability-audit/fixtures/*.json \
bash skills/github-actions-actor-reliability-audit/scripts/actor-reliability-audit.sh
输出约定
- - 报告模式下退出码为 0(默认)
- 当 FAILONCRITICAL=1 且一个或多个执行者组处于严重状态时,退出码为 1
- 文本模式打印摘要 + 排序后的执行者组
- JSON 模式打印摘要 + 排序后的组 + 严重组