Skip to content

[plan] Add GitHub Actions minutes cost estimation to generated workflows #10289

@github-actions

Description

@github-actions

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

  1. 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)
  2. 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)
    
  3. Include optimization suggestions when costs are high:

    • Reduce frequency (hourly → every 6 hours)
    • Use paths filters to skip unnecessary runs
    • Optimize tool usage (e.g., parallel jobs instead of sequential)
  4. 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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions