-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Objective
Add GitHub Actions minutes cost estimation to generated workflows, helping users understand resource consumption before deploying scheduled automation.
Context
Research recommended cost estimation as a high-value feature, especially for scheduled workflows that run frequently (hourly, daily, weekly). This helps teams make informed decisions about automation frequency.
Approach
-
Create cost estimation logic:
- Define average execution time per workflow type
- Calculate minutes per run based on job count + tool usage
- Multiply by schedule frequency (hourly = 720/month, daily = 30/month)
- Factor in multipliers: Playwright (+5 min), repo-memory (+1 min), network API calls (+2 min)
-
Add cost table to workflow documentation:
## Estimated Cost - **Execution time**: ~3 minutes per run - **Schedule**: Hourly (720 runs/month) - **Monthly total**: ~2,160 minutes (~36 hours) - **Free tier impact**: 2,160 / 2,000 = 108% (exceeds free tier) -
Include optimization suggestions when costs are high:
- Reduce frequency (hourly → every 6 hours)
- Use
pathsfilters to skip unnecessary runs - Optimize tool usage (e.g., parallel jobs instead of sequential)
-
Update agent instructions to always include cost estimation for scheduled workflows
Files to Modify
- Update:
.github/instructions/developer.instructions.md(add cost estimation guidelines) - Create:
.github/instructions/examples/cost-estimation-table.md(estimation reference)
Acceptance Criteria
- Cost estimation formula accounts for job count, tools, and schedule
- Cost table template includes execution time, frequency, monthly total
- Free tier impact calculated (GitHub Actions free tier = 2,000 min/month for public repos)
- Optimization suggestions provided when monthly cost exceeds 1,500 minutes
- Agent instructions updated to generate cost tables for scheduled workflows
- Tested with 3 scenarios: hourly monitoring, daily scan, weekly digest
Expected Impact
Helps users make informed decisions about automation frequency, preventing unexpected GitHub Actions minutes consumption and encouraging efficient workflow design.
Related to #10285
AI generated by Plan Command for discussion #10248