Skip to content

Latest commit

 

History

History
226 lines (161 loc) · 5.03 KB

File metadata and controls

226 lines (161 loc) · 5.03 KB

🔍 GitHub Actions $6 Charge - Investigation & Fix

💰 What Happened Last Month?

You were charged $6. Let's figure out why and prevent it.


🎯 Step 1: Check Your Billing Details

Go to: https://github.com/settings/billing/summary

Look for:

  1. "Actions minutes used" - See what ran
  2. "Workflow runs" - Click to see details
  3. Runner type - Linux (free) vs macOS/Windows (paid)

⚠️ Common Causes of Charges (Even on Public Repos):

1. macOS Runners (MOST LIKELY CAUSE) 💰

runs-on: macos-latest  # ❌ COSTS $0.08/minute!
  • Cost: $0.08/minute ($80 per 1,000 minutes)
  • $6 charge = ~75 minutes on macOS
  • Solution: Use ubuntu-latest instead

2. Windows Runners

runs-on: windows-latest  # ❌ COSTS $0.008/minute
  • Cost: $0.008/minute ($8 per 1,000 minutes)
  • $6 charge = ~750 minutes on Windows
  • Solution: Use ubuntu-latest instead

3. Private Repository

  • If your repo was private last month:
    • 2,000 minutes free
    • Then $0.008/minute
    • $6 = using ~2,750 minutes total (750 paid)

4. Other Workflows in Your Account

  • Check ALL your repositories
  • You might have other projects with workflows running

5. Storage Costs

  • Large artifacts stored
  • Check: Settings → Billing → Storage

✅ Solutions to Prevent Future Charges

Solution 1: Always Use Linux Runners (FREE)

jobs:
  update-data:
    runs-on: ubuntu-latest  # ✅ FREE FOREVER on public repos

The workflows I just created use ubuntu-latest

Solution 2: Verify Repository is Public

# Check your repo visibility
# Go to: https://github.com/avalidurl/sp100-financial-tracker/settings

# Should show: 🔓 Public

If private → Make it public or be aware of 2,000 min/month limit

Solution 3: Set Spending Limits

GitHub Settings → Billing → Spending limits
Set limit to: $0 (prevent ANY charges)

This will:

  • Stop workflows if you hit limits
  • Prevent surprise charges
  • You can adjust later if needed

Solution 4: Review All Active Workflows

# Check what workflows exist
# Go to: https://github.com/avalidurl/sp100-financial-tracker/actions

# Look for:
- Any workflows using macOS/Windows
- Long-running workflows
- Workflows that run too frequently

🔎 How to Check What Ran Last Month

Option 1: GitHub Web UI

  1. Go to: https://github.com/avalidurl/sp100-financial-tracker/actions
  2. Click "Usage" tab
  3. See breakdown by workflow and runner type

Option 2: GitHub Billing Page

  1. Go to: https://github.com/settings/billing/summary
  2. Click "View usage" under Actions
  3. Filter by date: Last month
  4. See detailed breakdown

Option 3: Download Usage Report

  1. Settings → Billing → Usage
  2. Click "Download usage report"
  3. Open CSV file
  4. Look for:
    • Workflow names
    • Runner type (Ubuntu/macOS/Windows)
    • Minutes used
    • Cost

💡 My Updated Workflows (100% FREE)

The two workflows I just created:

1. update-financial-data.yml

runs-on: ubuntu-latest  # ✅ FREE
# Runs: Every Monday at 6 AM
# Duration: ~3-5 minutes
# Cost: $0

2. update-market-caps.yml

runs-on: ubuntu-latest  # ✅ FREE
# Runs: Weekdays at 10 PM  
# Duration: ~1-2 minutes
# Cost: $0

Both use Linux runners = $0 forever!


🎯 Action Items for You

Immediately:

  1. ✅ Go to GitHub billing page and check what ran
  2. ✅ Set spending limit to $0 (prevent future charges)
  3. ✅ Verify repo is public

Check:

  1. Are there OTHER workflows in this repo we haven't seen?
  2. Do you have OTHER repositories with workflows?
  3. Was the repo private last month?

Going Forward:

  • ✅ My new workflows use ubuntu-latest (FREE)
  • ✅ Set spending limit to $0
  • ✅ Keep repo public
  • ✅ Monitor usage monthly

📊 Expected Usage (My Workflows)

Workflow Frequency Minutes/run Monthly Total Cost
Financial Data Weekly 3-5 min ~20 min $0
Market Caps Daily (5x/week) 1-2 min ~40 min $0
TOTAL ~60 min $0

Because: ubuntu-latest on public repo = FREE ✅


🚨 Warning Signs of Future Charges

Watch for:

  • Email: "GitHub Actions spending limit reached"
  • Workflows using macos-latest or windows-latest
  • Private repository (2,000 min limit)
  • Long-running workflows (>30 minutes each)

💬 Next Steps

Tell me:

  1. Can you check your GitHub billing and see what actually ran?
  2. Are there other workflows in your account?
  3. Was your repo private last month?

Then we can:

  • Delete expensive workflows
  • Set spending limits
  • Ensure everything stays FREE going forward

🎯 Quick Commands to Run

# 1. Check if repo is public
git remote -v
# Then visit that URL and check for 🔓 Public badge

# 2. Check for hidden workflows
ls -la .github/workflows/

# 3. See what's in your repo
git log --oneline --since="1 month ago" | grep -i "workflow\|action"

Let me know what you find! 🔍