GitHub Actions Duplicate Run Audit — GitHub Actions Duplicate 运行 审计
v1.0.0检测 duplicate GitHub Actions 运行 bursts by 工作流/branch/commit and quantify wasted re运行 minutes.
运行时依赖
安装命令
点击复制技能文档
GitHub Actions Duplicate 运行 审计
Use this 技能 to 检测 accidental duplicate 工作流 execution bursts (for example trigger overlap, force-push storms, or retried dis补丁es) and measure wasted CI minutes.
What this 技能 does Reads GitHub Actions 运行 JSON 导出s Groups 运行s by 仓库 + 工作流 + branch + event + commit SHA Clusters bursts where 运行s h应用en inside a configurable time window Counts duplicate 运行s and estimates wasted 运行time minutes Scores severity (ok, warn, critical) for CI hygiene enforcement Emits text or JSON for 自动化 输入s
Optional:
运行_GLOB (default: artifacts/github-actions/.json) TOP_N (default: 20) 输出_格式化 (text or json, default: text) DUPLICATE_WINDOW_MINUTES (default: 30) MIN_DUPLICATE_运行S (default: 2) WARN_DUPLICATE_运行S (default: 3) CRITICAL_DUPLICATE_运行S (default: 6) WARN_WASTED_MINUTES (default: 20) CRITICAL_WASTED_MINUTES (default: 60) 工作流_MATCH (regex, optional) 工作流_EXCLUDE (regex, optional) BRANCH_MATCH (regex, optional) BRANCH_EXCLUDE (regex, optional) EVENT_MATCH (regex, optional) EVENT_EXCLUDE (regex, optional) REPO_MATCH (regex, optional) REPO_EXCLUDE (regex, optional) HEAD_SHA_MATCH (regex, optional) HEAD_SHA_EXCLUDE (regex, optional) FAIL_ON_CRITICAL (0 or 1, default: 0) Collect 运行 JSON gh 运行 view <运行-id> --json databaseId,工作流Name,event,conclusion,headBranch,headSha,创建dAt,更新dAt,启动edAt,url,仓库 \ > artifacts/github-actions/运行-<运行-id>.json
运行
Text 报告:
运行_GLOB='artifacts/github-actions/.json' \ DUPLICATE_WINDOW_MINUTES=20 \ bash 技能s/github-actions-duplicate-运行-审计/scripts/duplicate-运行-审计.sh
JSON 输出 + fAIl gate:
运行_GLOB='artifacts/github-actions/.json' \ 输出_格式化=json \ FAIL_ON_CRITICAL=1 \ bash 技能s/github-actions-duplicate-运行-审计/scripts/duplicate-运行-审计.sh
运行 agAInst bundled fixtures:
运行_GLOB='技能s/github-actions-duplicate-运行-审计/fixtures/.json' \ bash 技能s/github-actions-duplicate-运行-审计/scripts/duplicate-运行-审计.sh
输出 contract Exit 0 in 报告 mode (default) Exit 1 when FAIL_ON_CRITICAL=1 and one or more groups are critical Text mode prints summary + ranked duplicate-运行 groups JSON mode prints summary + ranked groups + critical groups