@plainworkdigital/minutemeter
v0.1.0
Published
Estimate the billed minutes and dollars of your GitHub Actions workflows from the YAML, before you push. Offline, zero runtime dependencies.
Maintainers
Readme
Minutemeter: what do your GitHub Actions workflows cost?
Private repositories get 2,000 free Actions minutes a month on GitHub Free (3,000 on Pro and Team), then pay per minute. A matrix, a cron schedule, a macOS job or a missing timeout-minutes can use that up long before you notice. Minutemeter reads your workflow files and tells you, before you push, how many billed minutes and dollars they will use, with the arithmetic and the line that causes each charge.
It reads files only. It never runs your workflows, makes no network requests in the free version, and has no telemetry.
Example
Real output for the repository's own test fixture (a small Node project with a CI matrix and a nightly macOS build):
Minutemeter: 2 workflows in my-project
About 1,965 billed minutes, $34.15 a month at list prices. That is 5,692 Linux-equivalent minutes (each minute counted at its price relative to a $0.006 Linux minute, so macOS and Windows minutes weigh more), 285% of the 2,000 minutes GitHub Free includes. Assumes a private repository; if yours is public, standard runners are free (use --public or the setting).
.github/workflows/ci.yml (push, pull_request)
20 billed minutes per run ($0.144), 80 runs a month = 1,600 minutes, $11.52 a month
If every job hung until its timeout: 1,090 minutes ($7.98) per run
job test: 3 legs, ubuntu-latest | windows-latest, 6 min each (comment in the file) -> 18 min, $0.132; worst case 1080 min (no timeout-minutes)
job lint: ubuntu-latest, 2 min each (comment in the file) -> 2 min, $0.012; worst case 10 min
.github/workflows/nightly.yml (schedule)
12 billed minutes per run ($0.744), 30 runs a month = 365 minutes, $22.63 a month
If every job hung until its timeout: 30 minutes ($1.86) per run
job build-mac: macos-latest, 12 min each (comment in the file) -> 12 min, $0.744; worst case 30 min
Where the minutes go (most important first)
[MEDIUM] Job "test" has no timeout-minutes
.github/workflows/ci.yml:7
GitHub's default is 360 minutes, so one hung run of this job on windows-latest can bill up to 360 minutes ($3.60) before it is stopped. Add `timeout-minutes: 12` (a limit of about twice the run time; 12 is based on the 6 minutes assumed here, so use twice your real run time).
[LOW] Job "lint" may fit the cheaper ubuntu-slim runner
.github/workflows/ci.yml:23
ubuntu-slim bills $0.002 a minute instead of $0.006. It has 1 vCPU, runs steps in an unprivileged container (no Docker, no mounts) and stops jobs at 15 minutes. This job has no container, services, Docker use or build commands in its steps. If it still runs in under about three times its current time on one core, switching saves roughly $0.64 a month. Try it on a branch first.
Estimated saving: about $0.64 a month.
[LOW] Documentation-only changes start a full run
.github/workflows/ci.yml:3
There is no `paths` or `paths-ignore` filter, so a change to a README or a docs folder runs all jobs. If this workflow does not check docs, add `paths-ignore: ['**.md', 'docs/**']`. Not counted in the totals because it depends on how often you change only docs.What it counts
- Matrices expanded the way GitHub documents
includeandexclude, soos: [ubuntu, windows, macos]timesnode: [18, 20, 22]is 9 jobs, each on its own runner. - Prices: GitHub's list prices for standard hosted runners (Linux,
ubuntu-slim, Linux arm, Windows, macOS), dated in every report. Each job is rounded up to whole minutes, so a 20-second job bills 1 minute. - Schedules exactly from the cron expression (a
*/10schedule is about 4,380 runs a month). - Timeouts:
timeout-minutes, or GitHub's default of 360 minutes. The report shows the worst case if every job hung. - Local reusable workflows (
uses: ./.github/workflows/x.yml) are priced through their callers.
What it does not know (and says so)
- How long your jobs really take. It assumes 5 minutes per job. Set the real number with a comment (
# minutemeter: 12on the job) or in.minutemeter.json. This is the biggest source of error, and every report prints it. - How often you push. Defaults are printed (40 pushes, 40 pull request updates a month); set your own in
.minutemeter.json. - Job
if:conditions are not evaluated, so every job counts on every run. - Larger runners, custom runner labels and remote reusable workflows are listed as not counted, never guessed. Self-hosted runners are not billed by GitHub.
- Your included minutes are compared in Linux-equivalent minutes (dollars divided by the Linux rate), and the report names that basis next to every percentage: GitHub's billing docs now give prices rather than per-system minute multipliers, so Windows counts at 1.67x and macOS at 10.33x a Linux minute.
- Public repositories on standard runners are free. Minutemeter assumes a private repository unless you say otherwise (
--public, or the setting).
It is an estimate from your files, not an invoice.
Findings
Each finding names the line, what it costs, and the fix:
| Finding | Why it costs money |
|---|---|
| No timeout-minutes | A hung job runs up to 360 minutes (a macOS job: about $22) |
| push and pull_request both fire | Commits on a pull request branch run twice |
| macOS or Windows legs are most of the cost | $0.062 and $0.010 a minute against $0.006 for Linux |
| Schedule every few minutes | Whole-minute rounding turns a 20-second job into 1 minute, thousands of times a month |
| Job fits ubuntu-slim | $0.002 a minute instead of $0.006 (1 vCPU, 15-minute limit, no Docker) |
| No cancel-in-progress on pull requests | Superseded runs finish and bill |
| No dependency cache, no path filters | Hints; no saving is counted because it depends on your project |
On the command line
npx @plainworkdigital/minutemeter scan .
npx @plainworkdigital/minutemeter scan . --plan team --job-minutes 8
npx @plainworkdigital/minutemeter scan . --fail-on high--json gives machine-readable output. --fail-on high|medium|low exits 1 if a finding of that level exists, for CI.
.minutemeter.json
{
"plan": "free",
"private": true,
"defaultJobMinutes": 5,
"runsPerMonth": { "push": 60, "pull_request": 90, "workflow_dispatch": 2 },
"jobMinutes": { "test": 9, "ci.yml:lint": 2 },
"runs": { "release.yml": 4 }
}runsPerMonth sets the assumed runs for an event, jobMinutes the minutes for a job (by id, or file:id), and runs the total runs a month for one workflow file. Only numbers are read from this file.
Pro (one-time $9)
The free version is the whole estimator. Pro is for people who run several repositories or want a gate in CI. Get a key at https://plainworkdigital.com/d20261012a12/ and run minutemeter activate <key>.
- Account-wide view:
minutemeter portfolio ~/codescans every repository under a folder and compares the total with the one allowance they all share. - Budget gate:
--budget-usd 5or--budget-minutes 1500exits 1 when the estimate is over, for CI. - What does this change cost?
--base mainshows the minutes and dollars a branch adds or saves compared with another branch, tag or commit. It reads the old files with read-only git commands (ls-tree,cat-file); nothing is checked out or run. - Export:
--format md(Markdown, including the--basechange as a table, that you paste into a pull request comment; posting it automatically is not built yet) and--format sarif.
The key is checked once with Plainwork's licence server and remembered for 10 minutes; if the server cannot be reached, a key that worked before keeps working for a week. The free features never need the network.
Accuracy
Prices are copied from GitHub's billing documentation (read 2026-10-12) into one file, lib/rates.js. Matrix expansion, cron counting, rounding and caps are covered by tests, including real workflows from public projects. The run time of your jobs is an assumption unless you set it; Minutemeter has not been compared with real run histories, so treat the numbers as a planning estimate.
MIT licence. Made by Plainwork Digital, [email protected].
