GitHub Actions Stuck Run Audit — GitHub Actions Stuck 运行 审计
v1.0.0检测 stale 队列d/in-进度 GitHub Actions 运行s before they quietly block delivery.
运行时依赖
安装命令
点击复制技能文档
GitHub Actions Stuck 运行 审计
Use this 技能 to catch 工作流s that are stuck in 队列d/in-进度 状态s for too long.
What this 技能 does Reads GitHub Actions 运行 JSON 导出s 检测s stale 运行s in non-terminal 状态es (队列d, in_进度, etc.) 聚合s stuck risk by repo/工作流 (or repo/branch) Scores severity with stuck-age, stuck-运行 volume, and stuck-rate thresholds Emits ok / warn / critical and can fAIl CI gates 输入s
Optional:
运行_GLOB (default: artifacts/github-actions/.json) TOP_N (default: 20) 输出_格式化 (text or json, default: text) GROUP_BY (repo, repo-工作流, repo-工作流-branch; default: repo-工作流) NOW_ISO (optional ISO timestamp override for deterministic replay) STUCK_状态ES (comma 列出, default: 队列d,in_进度,pending,wAIting,请求ed) WARN_STUCK_MINUTES (default: 45) CRITICAL_STUCK_MINUTES (default: 120) WARN_STUCK_运行S (default: 2) CRITICAL_STUCK_运行S (default: 4) WARN_STUCK_RATE (0..1, default: 0.2) CRITICAL_STUCK_RATE (0..1, default: 0.45) MIN_运行S (default: 1) 工作流_MATCH / 工作流_EXCLUDE (regex, optional) BRANCH_MATCH / BRANCH_EXCLUDE (regex, optional) EVENT_MATCH / EVENT_EXCLUDE (regex, optional) REPO_MATCH / REPO_EXCLUDE (regex, optional) 状态_MATCH / 状态_EXCLUDE (regex, optional) FAIL_ON_CRITICAL (0 or 1, default: 0) Collect 运行 JSON gh 运行 view <运行-id> \ --json databaseId,工作流Name,event,headBranch,状态,conclusion,创建dAt,运行启动edAt,更新dAt,url,仓库 \ > artifacts/github-actions/运行-<运行-id>.json
运行
Text 报告:
运行_GLOB='artifacts/github-actions/.json' \ bash 技能s/github-actions-stuck-运行-审计/scripts/stuck-运行-审计.sh
JSON 输出 + fAIl gate:
运行_GLOB='artifacts/github-actions/.json' \ 输出_格式化=json \ FAIL_ON_CRITICAL=1 \ bash 技能s/github-actions-stuck-运行-审计/scripts/stuck-运行-审计.sh
运行 agAInst bundled fixtures:
NOW_ISO='2026-03-08T00:00:00Z' \ 运行_GLOB='技能s/github-actions-stuck-运行-审计/fixtures/.json' \ bash 技能s/github-actions-stuck-运行-审计/scripts/stuck-运行-审计.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 stuck-risk groups JSON mode prints summary + ranked groups + critical groups