Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

GitHub Actions Cost Estimation Implementation Plan

  • Create .github/agents/examples/ directory structure
  • Create cost-estimation-table.md template with:
    • Cost estimation formula (job count, tools, schedule frequency)
    • Execution time calculation with tool multipliers
    • Monthly total calculation
    • Free tier impact (2,000 min/month baseline)
    • Optimization suggestions for high-cost workflows
  • Update developer.instructions.md to include:
    • Cost estimation guidelines section
    • When to include cost tables (scheduled workflows)
    • Reference to cost estimation template
    • Best practices for cost-conscious workflow design
  • Test with example scenarios:
    • Hourly monitoring workflow (720 runs/month)
    • Daily scan workflow (30 runs/month)
    • Weekly digest workflow (4 runs/month)
  • Format and validate all changes with make fmt and make lint
Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Add GitHub Actions minutes cost estimation to generated workflows</issue_title>
<issue_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

  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

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Created .github/agents/examples/cost-estimation-table.md with comprehensive cost estimation framework
- Updated developer.instructions.md with cost estimation section including formula, architecture diagram, and agent guidelines
- Includes tool multipliers (Playwright +5min, repo-memory +1min, network APIs +2min)
- Provides schedule frequency calculations and optimization strategies
- Added examples for hourly monitoring, daily scan, and weekly digest workflows

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@pelikhan pelikhan closed this Jan 17, 2026
Copilot AI requested a review from mnkiefer January 17, 2026 00:06
Copilot stopped work on behalf of mnkiefer due to an error January 17, 2026 00:06
@github-actions github-actions bot mentioned this pull request Jan 17, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants