← 返回
开发者工具 中文

GitHub Actions Artifact Budget Audit

Audit GitHub Actions artifact storage usage from JSON exports so bloated artifacts are flagged before they inflate CI cost.
从 JSON 导出中审计 GitHub Actions 制品存储用量,在臃肿的制品推高 CI 成本前及时标记预警。
daniellummis
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 469
下载
💾 6
安装
1
版本
#latest

概述

GitHub Actions Artifact Budget Audit

Use this skill to detect oversized or stale GitHub Actions artifacts across repositories.

What this skill does

  • Reads one or more GitHub artifact JSON exports (gh api output)
  • Calculates artifact size in MB and totals by repository + artifact name
  • Flags warn/critical artifacts by configurable size thresholds
  • Highlights soon-to-expire artifact volume to prioritize cleanup
  • Supports text and JSON output for terminal or dashboards

Inputs

Optional:

  • ARTIFACT_GLOB (default: artifacts/github-actions-artifacts/*.json)
  • TOP_N (default: 20)
  • OUTPUT_FORMAT (text or json, default: text)
  • WARN_MB (default: 250)
  • CRITICAL_MB (default: 750)
  • SOON_EXPIRES_DAYS (default: 7)
  • FAIL_ON_CRITICAL (0 or 1, default: 0)
  • REPO_MATCH (regex, optional)
  • REPO_EXCLUDE (regex, optional)
  • ARTIFACT_MATCH (regex, optional)
  • ARTIFACT_EXCLUDE (regex, optional)

Collect artifact JSON

Single repository:

gh api repos/<owner>/<repo>/actions/artifacts --paginate \
  > artifacts/github-actions-artifacts/<owner>-<repo>.json

Combined multi-repo payloads are also supported as long as each file includes an artifacts array.

Run

Text report:

ARTIFACT_GLOB='artifacts/github-actions-artifacts/*.json' \
WARN_MB=300 \
CRITICAL_MB=900 \
bash skills/github-actions-artifact-budget-audit/scripts/artifact-budget-audit.sh

JSON output for automation:

ARTIFACT_GLOB='artifacts/github-actions-artifacts/*.json' \
OUTPUT_FORMAT=json \
FAIL_ON_CRITICAL=1 \
bash skills/github-actions-artifact-budget-audit/scripts/artifact-budget-audit.sh

Filter to one repo and artifact family:

ARTIFACT_GLOB='artifacts/github-actions-artifacts/*.json' \
REPO_MATCH='^flowcreatebot/' \
ARTIFACT_MATCH='(test-results|coverage)' \
bash skills/github-actions-artifact-budget-audit/scripts/artifact-budget-audit.sh

Run with bundled fixtures:

ARTIFACT_GLOB='skills/github-actions-artifact-budget-audit/fixtures/*.json' \
bash skills/github-actions-artifact-budget-audit/scripts/artifact-budget-audit.sh

Output contract

  • Exit 0 in reporting mode (default)
  • Exit 1 if FAIL_ON_CRITICAL=1 and at least one artifact is at/above CRITICAL_MB
  • In text mode: prints summary and top oversized artifact groups
  • In json mode: prints summary, grouped artifact stats, and critical artifact instances

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 21:27 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,927
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,474
security-compliance

GitHub Actions Trigger Health Audit

daniellummis
审计 GitHub Actions 运行状态,按触发事件和工作流划分,快速定位并优先处理不稳定的自动化源。
★ 0 📥 725