English | 简体中文

Suppose you push a commit to a pull request branch and the checks finish eight minutes later. How much runner time did they use?

Open the run and you see three jobs that started together. The Linux job ran for eight minutes, the Windows job for six, and the macOS job for five. That adds up to 8 + 6 + 5 = 19 runner minutes. To estimate the cost, you also need the rate for each runner.

AI can generate code faster, so teams can get more changes ready in a day. If that means more pull requests or more pushes to the same branch, those events can trigger more CI runs. Five extra runs of the checks above would use another 5 × 19 = 95 runner minutes. When that extra time is billable, the monthly Actions cost goes up.

I’d check the most expensive workflow first. Did it run more often, or did its jobs take longer?

Which runs consume the most runner time?

In their ICSE 2024 paper, Islem Bouzenia and Michael Pradel analyzed about 1.3 million workflow runs from 952 open-source repositories. The dataset spans September 2020 through February 2023. For each run, they add up the time each job spends on its virtual machine. The paper calls that total VM time. Study methodology

The authors grouped repositories that averaged more than 2,000 VM minutes per month into a paid tier. Under the paper’s historical pricing model, the paid tier’s average annual compute cost came to an estimated $504 per repository after deducting the free minutes. Study cost estimates

In the paid tier, workflows triggered by pull requests accounted for 50.7% of VM time. Pushes accounted for 30.9%, and scheduled runs accounted for 15.5%. Among the jobs the researchers could classify by name, tests used 54.6% of VM time and builds used 36.6%, for a combined 91.2%. Tables 1 and 2

In the same tier, 17.4% of workflow runs failed and consumed 30.9% of VM time. Think back to the pull request. If the macOS job fails at minute five and the Linux and Windows jobs finish as usual, the failed run still accounts for all 19 minutes. When failed runs take up a lot of time, I’d open the records to see which job failed and how long the other jobs ran. Table 3

Follow the cost down to a job

The GitFinOps team saw GitHub spending rise as AI sped up code production. They built a workbench that traces Actions costs to individual workflows and jobs. GitFinOps homepage

Give the read-only GitFinOps GitHub App access to the repositories you want to monitor and enable collection. From that point, GitFinOps collects new execution records through webhooks and the REST API and reads the current cache and artifact inventories. GitFinOps setup guide

GitFinOps estimates costs from completed job runtimes and saved runner rates. You can see totals by repository and workflow and drill down to individual jobs. I’d open one of the workflows with the highest estimated cost, compare the runners used across recent runs, and check how many times the same job ran.

GitFinOps flags jobs with unknown runner rates. Check for gaps before comparing workflow estimates. To reconcile actual charges, use the GitHub usage report for the same billing period. GitFinOps cost breakdown

GitFinOps Workbench in Chinese with a cost trend chart for November 1 to 26.

The sample workspace shows an estimated $642 in execution costs from November 1 to 26. GitFinOps Chinese preview

Does that scheduled build need to run every hour?

Suppose a scheduled build runs hourly and has one six-minute job. It uses 24 × 6 = 144 minutes a day. If downstream users pick up the artifact once a day, do they need all 24 builds?

I’d open the run history in GitFinOps Workbench and ask the maintainers what else the build checks. If its only purpose is to produce the daily artifact, you can change the schedule to once a day in GitHub. Record the change and baseline in Workbench. Once you have comparable run records, check total job minutes, run counts, and success rates. Confirm downstream users can still pick up the artifact on time. Tracking changes in GitFinOps

Workbench looks at the past seven days for scheduled runs, reruns, and short jobs. It uses the past 24 hours for failures and long-tail jobs. If multiple rules flag the same job, Workbench counts its candidate runtime once. For storage, use cache last-access times and artifact creation times to decide which files to keep. GitFinOps optimization guide

The GitFinOps optimization panel in Chinese lists Actions runtime, caches, and artifacts for review.

The sample workspace flags 120 minutes of Actions runtime, 2.4 GiB of caches, and 4.8 GiB of artifacts for review. GitFinOps Chinese preview

The study also estimated savings for paid-tier workflows that used each optimization. Custom timeouts saved an estimated 8.1% of VM time. Canceling runs superseded by a new run saved an estimated 4.1%, and caching saved 3.4%. If a job keeps getting stuck, I’d look at how long it takes when it succeeds and check which step stalls before setting the timeout. Table 4

What do you check after a budget alert?

Pro and Team workspaces can set a monthly budget. GitFinOps sums the estimates for completed jobs with known runner rates in the current UTC calendar month. It sends an email to the verified address at 50%, 80%, and 100% of the budget. GitFinOps budget alerts

The GitFinOps monthly budget panel in Chinese shows progress and a verified alert email.

The sample workspace shows $1,600 in estimated execution costs, or 80% of a $2,000 monthly budget. GitFinOps Chinese preview

After a budget email, I’d go back to the workspace, find the repositories with the highest estimated costs that month, and look at the recent runs of one workflow. If every push to the pull request branch runs jobs on all three platforms, check what each job verifies. Did two workflows run the same tests against the same commit? The answer helps you decide whether to change the trigger. Open GitFinOps