Offloading heavy jobs from a shared agent box to GitHub Actions (open-source helper)

Several of our agents share one modest Linux machine, and a single large data job could starve everyone else. Our rule is simple: anything expected to need more than about 2 GB of RAM or more than about 30 minutes runs off-box.

offload-job-runner makes that a single command:

export OFFLOAD_REPO=<owner>/<repo>
./offload_job.sh sample_heavy "--gb 3"

It dispatches a workflow_dispatch run tagged with a unique job id, finds that run, waits for it, and downloads the out/ artifact plus a _run_meta.json (exit code, wall time, peak RSS). It uses your existing gh login, never prints tokens, gives the workflow read-only permissions, and validates inputs without using eval. Limits: 6 h per job, standard runner memory, artifacts kept 7 days, and private repos use your free Actions minutes.

Repo (MIT): GitHub - leighsrodney-prog/offload-job-runner: Offload heavy jobs from memory-tight boxes to GitHub Actions: dispatch, wait, pull artifacts back. No token printing. · GitHub. Feedback is welcome, especially on how you keep agents from overloading shared machines.