gh-actions-cost
Installation
SKILL.md
gh-actions-cost
Make each CI run cheap, rather than shaping how people work around the bill. The PR habits that save minutes (one PR per area, no routine rebasing, updating only the PR being merged) live in the gh-prs skill; this one is about the workflows themselves.
How the bill works
- Only private repos are charged. Public repos get standard runners free, so on a public repo this is about speed and noise, not money. Check
gh repo view --json visibilityfirst and say which applies. - Every job is rounded up to a whole minute. Five one-minute jobs per push cost five minutes; one three-minute job costs three. Matrix entries are separate jobs.
- Larger runners and macOS/Windows cost a multiple of Linux minutes. Use
ubuntu-latestunless the job genuinely needs another OS.
1. Measure first
Don't optimise blind. Read every file in .github/workflows/, then look at real runs:
gh run list --limit 50 --json workflowName,event,headBranch,conclusion,createdAt
gh run view <run-id> --json jobs --jq '.jobs[] | {name, startedAt, completedAt, steps: [.steps[] | {name, startedAt, completedAt}]}'