返回顶部
g

github-actions-rerun-waste-audit重跑浪费审计

Quantify wasted GitHub Actions minutes caused by reruns so flaky workflows can be fixed with data.

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

github-actions-rerun-waste-audit

GitHub Actions 重试浪费审计

使用此技能来评估 GitHub Actions 中因重试和重复尝试导致的 CI 浪费。

此技能的功能

  • - 读取一个或多个运行 JSON 导出文件(gh run view --json ...)
  • 按仓库 + 工作流 + 分支 + 提交 + 任务名称对尝试进行分组
  • 估算每个分组中除最新尝试外的所有尝试造成的重试浪费
  • 使用浪费分钟数阈值标记严重程度
  • 输出文本或 JSON 格式,用于分类仪表板和 CI 质量审查

输入参数

可选参数:
  • - RUNGLOB(默认值:artifacts/github-actions/*.json)
  • TOPN(默认值:20)
  • OUTPUTFORMAT(text 或 json,默认值:text)
  • WARNMINUTES(默认值:10)
  • CRITICALMINUTES(默认值:30)
  • FAILONCRITICAL(0 或 1,默认值:0)
  • WORKFLOWMATCH、WORKFLOWEXCLUDE(正则表达式,可选)
  • JOBMATCH、JOBEXCLUDE(正则表达式,可选)
  • REPOMATCH、REPOEXCLUDE(正则表达式,可选)
  • BRANCHMATCH、BRANCH_EXCLUDE(正则表达式,可选)

收集运行 JSON

bash
gh run view --json databaseId,workflowName,headBranch,headSha,runAttempt,url,repository,jobs \
> artifacts/github-actions/run-.json

如果缺少 runAttempt,此技能也会检查 run_attempt 和任务级别的 attempt。

运行

文本报告:

bash
RUN_GLOB=artifacts/github-actions/*.json \
WARN_MINUTES=8 \
CRITICAL_MINUTES=20 \
bash skills/github-actions-rerun-waste-audit/scripts/rerun-waste-audit.sh

JSON 输出 + 失败门控:

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

仓库/工作流过滤:

bash
RUN_GLOB=artifacts/github-actions/*.json \
REPO_MATCH=^flowcreatebot/ \
WORKFLOW_MATCH=(CI|Build) \
bash skills/github-actions-rerun-waste-audit/scripts/rerun-waste-audit.sh

使用捆绑的测试数据运行:

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

输出约定

  • - 报告模式下退出码为 0
  • 当 FAILONCRITICAL=1 且存在至少一个严重分组时,退出码为 1
  • 文本输出包含摘要、阈值和重试浪费最多的分组
  • JSON 输出包含 summary、排序后的 groups 和 critical_groups

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 github-actions-rerun-waste-audit-1776200605 技能

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

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

通过命令行安装

skillhub install github-actions-rerun-waste-audit-1776200605

下载

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

文件大小: 6.91 KB | 发布时间: 2026-4-15 12:23

v1.0.0 最新 2026-4-15 12:23
Initial release of GitHub Actions Rerun Waste Audit.

- Measures CI minutes wasted due to reruns in GitHub Actions workflows.
- Groups and analyzes run attempts by repository, workflow, branch, commit, and job.
- Provides waste severity flags based on configurable thresholds.
- Supports flexible filtering and output in both text and JSON formats.
- Can be integrated into dashboards or CI quality review processes.
- Optional fail gate for CI enforcement on critical waste levels.

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

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

p2p_official_large
返回顶部