GitHub Actions integration

GitHub Actions cost alerts with reversible brakes

Costbrake watches GitHub spend with a read-only fine-grained token or a one-click app install: it reads your billing usage report through the day and checks running Actions jobs every 5 minutes, estimated at list price until GitHub bills them.

Free checks hourly and sends email. Pro at $12 a month and Team at $39 a month check every 5 minutes and add 2 brakes an admin confirms by hand: disable a workflow and cancel its runs, or set the organization's Actions budget to $0 with Stop usage on. Every brake has an Undo.

GitHub Actions at a glance

Reads
Billing usage report through the day, plus running Actions jobs every 5 minutes at list price until billed
Key
Read-only fine-grained token with Organization Administration or Account Plan, plus Repository Actions; or the Costbrake GitHub App
Setup
One-click install of the Costbrake GitHub App, or a fine-grained token from a pre-filled GitHub link
Free plan
Hourly checks, email alerts
Pro and Team
Every 5 minutes; every 15 minutes when fewer than 750 API requests are left in the hour
Spike checks
No speed-up; stays at every 5 minutes
Brakes
2: disable a workflow, $0 Actions budget (organizations)

Brakes

2 brakes for GitHub Actions

An admin picks a brake, confirms it, and can undo it later. Brakes come with Pro and Team.

  • Admin confirms

    Disable workflow

    Disables one workflow, so pushes, schedules and manual triggers no longer start it, and cancels its queued and running runs.

    UndoRe-enables the workflow if Costbrake disabled it; cancelled runs are not restarted.

    Runs that keep going are force-cancelled, which also skips steps that use if: always().

  • Admin confirms

    $0 Actions budget

    Sets the organization's Actions budget to $0 with Stop usage on, so no repository can start jobs on GitHub-hosted runners beyond the included usage.

    UndoRestores the previous budget, or deletes the $0 budget if Costbrake created it.

    Organizations only, and it blocks GitHub-hosted runners for every repository in the organization, not one workflow.

Can you set a hard spending limit on GitHub Actions?

Yes. GitHub budgets can stop usage of metered products such as Actions: if a budget with Stop usage when budget limit is reached is used up, additional usage is blocked. In GitHub's own example, an organization that hits its $50 Actions budget is blocked from all GitHub-hosted runners until the next billing cycle or until the budget goes up.

The catch is scope. A budget stops everything at once and can't single out the one workflow stuck in a loop. Actions is free for standard GitHub-hosted runners in public repositories and for self-hosted runners; private repositories get a monthly included amount, then pay. Prices and included minutes are in GitHub Actions pricing, and budget setup in GitHub Actions spending limit.

ControlWhat it doesThe gap
Budget with Stop usageBlocks metered usage once the budget is used upStops every GitHub-hosted runner in the organization, not one workflow
Budget without Stop usageLets you monitor spend without blocking anyoneNothing stops
Disable a workflow by handStops new triggers of that workflowExisting runs keep going until you cancel them
CostbrakeRunning-job estimates every 5 minutes, spike alerts, both brakesAn admin confirms every brake; no faster checks in a spike

What Costbrake reads from GitHub

Billed dollars come from GitHub's billing usage report, which needs read access to Organization Administration for an organization or to Account Plan for a personal account. Running Actions jobs are checked every 5 minutes and priced at list price until they show up in the bill. Seat and license charges arrive daily.

Polling uses up to about 450 of the 5,000 API requests per hour a token gets. When fewer than 750 are left, Costbrake slows to every 15 minutes so your own automation keeps its share.

The GitHub token and the GitHub App

The fastest setup is one click: install the Costbrake GitHub App and approve read access; the same install signs you in. If you can't install apps, generate a fine-grained token from the pre-filled link Costbrake gives you: read-only Organization Administration or Account Plan, plus Repository Actions. GitHub only creates fine-grained tokens in the browser, so your AI agent prepares the link and you click Generate, as described in agent setup. Classic tokens are not accepted.

Brakes need write access, so they use a separate install of the Costbrake Brakes app or a separate fine-grained token with Repository Actions read and write. The $0 budget brake also needs Organization Administration read and write.

How a GitHub brake works

Costbrake never brakes on its own. On Pro and Team, an admin turns the killswitch on for the connection, picks a workflow or the organization budget, types the connection name and clicks Brake now. GitHub's disable doesn't cancel runs that already started, so the workflow brake cancels them too and force-cancels any that keep going. For how loops start, see runaway GitHub Actions workflows.

  • The $0 budget brake needs an organization; personal accounts get the workflow brake only.
  • Undo re-enables the workflow but doesn't restart cancelled runs.
  • There is no brake for other metered GitHub products; for those, Costbrake alerts and you act on GitHub.

What triggers a GitHub alert

A spike alert fires when an hour costs more than 3 times your 7-day hourly average and at least $5 more, once Costbrake has 24 hours of history. Budget alerts fire at 50, 80 and 100 percent by default, and Pro adds forecast alerts. Free sends email; Pro adds Slack, Discord and webhooks; Team adds PagerDuty. Compare plans on the pricing page.

Questions and answers

Does Costbrake stop GitHub Actions spend automatically?

No. Costbrake alerts you, and an admin on Pro or Team decides whether to brake. A brake needs the killswitch turned on for the connection, the connection name typed in, and a click on Brake now. Every brake has an Undo.

Is the Costbrake GitHub token read-only?

Yes. The read token or app only has read access to billing (Organization Administration or Account Plan) and to Repository Actions. Brakes use a separate app install or a separate token with write access that you only add if you want brakes.

How quickly does Costbrake see a runaway GitHub Actions workflow?

On Pro and Team, Costbrake checks running Actions jobs every 5 minutes and prices them at list price before GitHub bills them. GitHub checks don't speed up during a spike, and they slow to every 15 minutes when the token has fewer than 750 API requests left in the hour.

Does disabling a GitHub workflow cancel its running jobs?

Not on GitHub's side: disabling a workflow doesn't cancel its existing runs. The Costbrake workflow brake disables the workflow and also cancels its queued and running runs, force-cancelling any that keep going.

Can I use the $0 Actions budget brake on a personal account?

No. The budget brake sets an organization budget, so it only appears for organization accounts. Personal accounts get the workflow brake.

Sources

Updated

Start with 14 days of Pro, free

Catch the next GitHub Actions spike before the invoice.

14 days of Pro, then Free for 2 accounts. No card needed.