Skip to content

Switch shared workflow runners to ubuntu-slim #102

Description

@ineedjet

Context

While auditing GitHub Actions spend for dupmachine, I found that dupmachine/ground-control (private) burned ~2559 minutes of Actions Linux ($0.006/min) in August — the first month it went over the 2000 free-minute quota (net $0.732). The dominant cost is three cron workflows (collect-issues-agenda, collect-issues-clarification, collect-pull-requests-agenda) that call this repo's shared workflows every 2 hours.

Non-obvious billing fact, confirmed directly in the org billing usage export: even though starcast is public, minutes for a workflow_call job are billed against the calling repo, not the repo hosting the reusable workflow. So this repo's runner choice affects private callers' cost even though starcast itself never pays for its own Actions minutes.

Finding

collect-issues-shared.yml, collect-pull-requests-shared.yml, and route-issue-shared.yml each run a single composite step (shell: bashpython3 .../script.py), calling GitHub's API via gh/GraphQL. No Docker, no privileged filesystem operations, no matrix. That fits GitHub's new ubuntu-slim runner (1 vCPU / 5 GB RAM, $0.002/min vs $0.006/min — 3.33x cheaper), whose only real constraints are unprivileged mode (no Docker-in-Docker, no fs mounts) and a 15-minute job timeout.

Proposal

Switch runs-on: ubuntu-latestruns-on: ubuntu-slim in:

  • .github/workflows/collect-issues-shared.yml
  • .github/workflows/collect-pull-requests-shared.yml
  • .github/workflows/route-issue-shared.yml

Alternative if you'd rather not force it org-wide: add a runner input to each (type: string, default: ubuntu-latest) so callers can opt into ubuntu-slim individually.

Caveat

I haven't measured actual runtime/memory footprint at scale (e.g. collecting issues across a large org with many repos) — worth a trial run to confirm it stays within slim's 5 GB RAM / 15-minute budget before merging, especially for orgs with a lot of open issues/PRs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions