Skip to content
NewA realistic 3D head for a free swim cap editor
Nov 29, 2026·4 MIN READ
GitHub Actions billing stopped our CI, and showed where the minutes went

GitHub Actions billing stopped our CI, and showed where the minutes went

A merge to main did not deploy because every CI job was blocked by billing. The usage report showed that one end-to-end suite on every push used more minutes than the rest of our CI together.

I merged a backend pull request for Vimo Swim, waited for the deploy, and nothing happened. CI on main had failed: all eight jobs, red, each with zero steps. No log, no test output. The pull request had passed the same CI an hour earlier.

The reason was one annotation on the check run, not in the logs:

check run annotation
The job was not started because recent account payments have failed
or your spending limit needs to be increased.

When every job fails with zero steps, the code is not the problem. Read the check run annotations (gh api repos/<owner>/<repo>/check-runs/<id>/annotations) before you debug anything.

Where the minutes went

After billing was sorted out and CI ran again, I wanted to know how a small team had used up its CI budget in one month. The billing usage endpoint gives the answer per repository and per day:

November usage per repo
gh api "/organizations/<org>/settings/billing/usage?year=2026&month=11"
RepositoryMinutesShare
Website6,40352%
Backend3,06925%
Firmware2,63521%
Two small repos1631%
Total12,270100%

I expected the backend to be the problem, because that is where most branches and pull requests live. It was not. The website alone used more than half of the minutes.

pie showData
    "Website" : 6403
    "Backend" : 3069
    "Firmware" : 2635
    "Other" : 163

One job on every push

Grouping the website runs by workflow and branch made it clear. CI on main ran 96 times on push, and every run included the end-to-end suite. That job builds the site again and runs Playwright, and it takes up to 30 minutes. Lint, typecheck, unit tests and the build together take about five.

The other two repositories had a different shape of the same problem. Every pull request ran the full set: the Docker build and security scans on the backend, a five-way feature matrix, docs and a dependency audit on the firmware. Fourteen jobs for a firmware PR, most of them under a minute, and each one billed on its own.

What I changed

E2E runs nightly

The 30-minute suite now runs once a night and by hand, not on each of about 100 pushes a month.

Light CI on PRs

PRs keep lint, tests and the schema check. Docker build, security scans and the feature matrix run on main only.

Cancel stale runs

A new push to a PR cancels its older run. Runs on main are never cancelled, so a deploy is never cut off.

The cancel rule is one block per workflow. The condition matters: cancelling a run on main halfway could stop a deploy.

.github/workflows/ci.yml
concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

If a final "CI Success" job checks that every job passed, a job skipped on PRs will now fail it. Check for failure instead: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled').

All three changes went through CI on their own pull requests first, so I could see the skipped jobs show as "skipping" and not block the merge. The next step is a self-hosted runner on the Mac mini in the office for the website and firmware. The backend stays on GitHub, because its tests use Postgres and Redis service containers, and those need a Linux runner.

What it took

The fix was three small YAML changes. Finding out what to fix took longer, and it only happened because CI stopped. I set up those workflows to be thorough and never looked at what thorough cost per push. Next time I add a slow job, I will decide on day one whether it runs on every push, on main, or once a night.

Share
Mariusz Smenżyk
Written by

Mariusz Smenżyk

Builder for sport. Make. Test. Launch.

Related notes