GitHub Actions Conclusion Volatility Audit
Use this skill to detect unstable workflows that frequently flip between success and failure-like outcomes.
What this skill does
- - Reads one or more workflow run JSON exports
- Groups runs by repository + workflow + branch
- Calculates volatility using conclusion transitions across run history
- Flags groups by warn/critical instability thresholds
- Emits text or JSON output for CI reporting and quality gates
Inputs
Optional:
- -
RUN_GLOB (default: artifacts/github-actions/*.json) - INLINECODE2 (default:
20) - INLINECODE4 (
text or json, default: text) - INLINECODE8 (default:
5) — minimum runs before severity is applied - INLINECODE10 (default:
35) - INLINECODE12 (default:
60) - INLINECODE14 (
0 or 1, default: 0) - INLINECODE18 ,
WORKFLOW_EXCLUDE (regex, optional) - INLINECODE20 ,
BRANCH_EXCLUDE (regex, optional) - INLINECODE22 ,
REPO_EXCLUDE (regex, optional)
Failure-like conclusions are: failure, cancelled, timed_out, action_required, startup_failure.
Collect run JSON
CODEBLOCK0
Run
Text report:
CODEBLOCK1
JSON output + fail gate:
CODEBLOCK2
Output contract
- - Exit
0 in reporting mode - Exit
1 when FAIL_ON_CRITICAL=1 and one or more critical groups are found - Text output includes summary and top unstable workflow groups
- JSON output includes
summary, ranked groups, and INLINECODE34
GitHub Actions 结论波动性审计
使用此技能检测频繁在成功与失败类结果之间切换的不稳定工作流。
此技能的功能
- - 读取一个或多个工作流运行的JSON导出文件
- 按仓库+工作流+分支对运行进行分组
- 通过运行历史中的结论转换计算波动性
- 根据警告/严重不稳定阈值标记分组
- 输出文本或JSON格式,用于CI报告和质量门禁
输入
可选参数:
- - RUNGLOB(默认值:artifacts/github-actions/*.json)
- TOPN(默认值:20)
- OUTPUTFORMAT(text或json,默认值:text)
- MINRUNS(默认值:5)——应用严重性前的最小运行次数
- WARNINSTABILITYPCT(默认值:35)
- CRITICALINSTABILITYPCT(默认值:60)
- FAILONCRITICAL(0或1,默认值:0)
- WORKFLOWMATCH、WORKFLOWEXCLUDE(正则表达式,可选)
- BRANCHMATCH、BRANCHEXCLUDE(正则表达式,可选)
- REPOMATCH、REPOEXCLUDE(正则表达式,可选)
失败类结论包括:failure、cancelled、timedout、actionrequired、startup_failure。
收集运行JSON
bash
gh run view --json databaseId,workflowName,headBranch,conclusion,createdAt,updatedAt,url,repository \
> artifacts/github-actions/run-.json
运行
文本报告:
bash
RUN_GLOB=artifacts/github-actions/*.json \
WARNINSTABILITYPCT=35 \
CRITICALINSTABILITYPCT=60 \
bash skills/github-actions-conclusion-volatility-audit/scripts/conclusion-volatility-audit.sh
JSON输出+失败门禁:
bash
RUN_GLOB=artifacts/github-actions/*.json \
OUTPUT_FORMAT=json \
FAILONCRITICAL=1 \
bash skills/github-actions-conclusion-volatility-audit/scripts/conclusion-volatility-audit.sh
输出约定
- - 报告模式下退出码为0
- 当FAILONCRITICAL=1且发现一个或多个严重分组时,退出码为1
- 文本输出包含摘要和排名靠前的不稳定工作流分组
- JSON输出包含summary、排序后的groups和critical_groups