返回顶部
g

github-actions-rerun-effectiveness-auditGitHub操作重跑审计

Audit GitHub Actions rerun dependency and success-after-rerun effectiveness to highlight workflows wasting CI time.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
264
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

github-actions-rerun-effectiveness-audit

技能名称: github-actions-rerun-effectiveness-audit
详细描述:

GitHub Actions 重跑有效性审计

使用此技能来衡量工作流需要重跑的频率,以及重跑是否真的能恢复失败。

该技能的功能

  • - 读取 GitHub Actions 运行 JSON 导出文件
  • 使用工作流运行 ID + 尝试历史记录追踪重跑事件
  • 衡量重跑率、重跑成功率以及额外重跑尝试次数
  • 根据尝试持续时间估算浪费的重跑分钟数
  • 为 CI 策略门控输出严重级别(ok、warn、critical)

输入参数

可选参数:
  • - RUNGLOB(默认值:artifacts/github-actions/*.json)
  • TOPN(默认值:20)
  • OUTPUTFORMAT(text 或 json,默认值:text)
  • GROUPBY(workflow 或 workflow-branch,默认值:workflow)
  • FAILURECONCLUSIONS(逗号分隔,默认值:failure,cancelled,timedout,startupfailure,actionrequired)
  • SUCCESSCONCLUSIONS(逗号分隔,默认值:success)
  • MINRUNS(最小工作流运行次数,默认值:4)
  • WARNRERUNRATE(0..1,默认值:0.2)
  • CRITICALRERUNRATE(0..1,默认值:0.35)
  • WARNRERUNSUCCESSRATE(0..1,默认值:0.5)
  • CRITICALRERUNSUCCESSRATE(0..1,默认值:0.25)
  • WARNWASTEDMINUTES(默认值:20)
  • CRITICALWASTEDMINUTES(默认值:60)
  • WORKFLOWMATCH / WORKFLOWEXCLUDE(正则表达式,可选)
  • BRANCHMATCH / BRANCHEXCLUDE(正则表达式,可选)
  • EVENTMATCH / EVENTEXCLUDE(正则表达式,可选)
  • REPOMATCH / REPOEXCLUDE(正则表达式,可选)
  • ACTORMATCH / ACTOREXCLUDE(正则表达式,可选)
  • FAILONCRITICAL(0 或 1,默认值:0)

收集运行 JSON

bash
gh run view --attempt \
--json databaseId,runAttempt,workflowName,event,headBranch,headSha,conclusion,createdAt,updatedAt,runStartedAt,url,repository,actor,triggeringActor \
> artifacts/github-actions/run--attempt-.json

运行

文本报告:

bash
RUN_GLOB=artifacts/github-actions/*.json \
bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-audit.sh

JSON 输出 + 失败门控:

bash
RUN_GLOB=artifacts/github-actions/*.json \
OUTPUT_FORMAT=json \
FAILONCRITICAL=1 \
bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-audit.sh

针对捆绑的测试数据运行:

bash
RUN_GLOB=skills/github-actions-rerun-effectiveness-audit/fixtures/*.json \
bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-audit.sh

输出约定

  • - 在报告模式下退出码为 0(默认)
  • 当 FAILONCRITICAL=1 且一个或多个组处于严重状态时,退出码为 1
  • 文本模式打印摘要 + 排名靠前的工作流组
  • JSON 模式打印摘要 + 排名靠前的组 + 严重组

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 github-actions-rerun-effectiveness-audit-1776193931 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 github-actions-rerun-effectiveness-audit-1776193931 技能

通过命令行安装

skillhub install github-actions-rerun-effectiveness-audit-1776193931

下载

⬇ 下载 github-actions-rerun-effectiveness-audit v1.0.0(免费)

文件大小: 6.44 KB | 发布时间: 2026-4-15 11:01

v1.0.0 最新 2026-4-15 11:01
Initial release of github-actions-rerun-effectiveness-audit.

- Audits GitHub Actions workflows for rerun dependency and effectiveness.
- Measures rerun frequency, recovery rates, and CI time potentially wasted on ineffective reruns.
- Provides severity assessment (`ok`, `warn`, `critical`) for policy enforcement.
- Supports customizable filtering and reporting in text or JSON formats.
- Allows CI gating based on critical rerun metrics with exit code control.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部