From 7ebd95c01c369a3ec5dedfb78c94595653e0cf3c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 30 Oct 2026 19:20:47 +0000 Subject: [PATCH] Let the route job run off GitHub-hosted minutes When a private repository's GitHub-hosted minutes run out, GitHub does not start the route job on ubuntu-slim, so no job can be routed. The reusable workflow now takes a runs-on input, or the ROUTACT_ROUTER_RUNS_ON variable, so an organization can route from a runner such as Blacksmith. ubuntu-slim stays the default. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Vdh4Z431pzGdWVWoAFNQqc --- .github/workflows/route.yml | 13 ++++++++++--- README.md | 10 ++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/route.yml b/.github/workflows/route.yml index d16784f..36ecb20 100644 --- a/.github/workflows/route.yml +++ b/.github/workflows/route.yml @@ -42,6 +42,10 @@ on: description: 'GitHub App id. Default is the ROUTACT_APP_ID variable.' type: string required: false + runs-on: + description: 'Runner for the route job itself, as JSON (a label or a label array). Default is the ROUTACT_ROUTER_RUNS_ON variable, else "ubuntu-slim".' + type: string + required: false secrets: ROUTACT_APP_PRIVATE_KEY: required: false @@ -66,9 +70,12 @@ on: jobs: route: - # The smallest, fastest-starting GitHub-hosted runner. Never self-hosted: - # the router must not depend on the pool it is checking. - runs-on: ubuntu-slim + # The smallest, fastest-starting GitHub-hosted runner by default. Set the + # runs-on input or the ROUTACT_ROUTER_RUNS_ON variable to route from a + # runner that does not use GitHub's minutes, such as Blacksmith. Never use + # a pool the router checks: it could not route away from that pool when it + # is full. + runs-on: ${{ fromJSON(inputs.runs-on || vars.ROUTACT_ROUTER_RUNS_ON || '"ubuntu-slim"') }} timeout-minutes: 3 env: HAS_APP_KEY: ${{ secrets.ROUTACT_APP_PRIVATE_KEY != '' }} diff --git a/README.md b/README.md index 281e8b7..deb3bd0 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,16 @@ The check reads the organization's [billing usage summary](https://docs.github.c - GitHub updates billing usage with a delay, so a few jobs can still start on paid minutes right after the included minutes run out. - The check counts the whole organization. Public repositories use GitHub-hosted runners for free, so do not route them through a pool that ends on a self-hosted runner. +### Where the route job runs + +The reusable workflow runs the route job on GitHub's `ubuntu-slim`. When a private repository's GitHub-hosted minutes are used up and the spending limit is reached, GitHub does not start that job, so nothing can be routed. To route from a runner that does not use GitHub's minutes, set the org variable `ROUTACT_ROUTER_RUNS_ON` (or the `runs-on` input) to a JSON label or label array: + +```sh +gh variable set ROUTACT_ROUTER_RUNS_ON --org your-org --body '"blacksmith-2vcpu-ubuntu-2404"' +``` + +Do not point it at a self-hosted pool that the router checks. When that pool is full, the route job would wait behind the jobs it is meant to route away from. + ### Fork pull requests Fork PRs skip the primary and every fallback step labelled `self-hosted`. Other checks still run, so a fork PR can use Blacksmith when it is enabled.