Interview Prep/GitHub Actions/Runners, ARC, Monorepos & Releases

Persistent self-hosted runners keep failing because a previous job left files and Docker images. Fix the root cause.

BeginnerScenarioRunners, ARC, Monorepos & Releases
Answer

Situation read → State leaking between jobs.

What I'd do →

  1. Move to ephemeral runners (--ephemeral with autoscaling, or ARC).
  2. In the meantime, a job-completed hook (ACTIONS_RUNNER_HOOK_JOB_COMPLETED=/opt/cleanup.sh) that wipes the workspace, prunes Docker and removes temp credentials.

Why → Cleanup scripts are a patch; ephemeral runners remove the class of problem.

Interview tip → Know the runner job-started and job-completed hooks.

All GitHub Actions questions Roadmap: GitHub Actions

More on Runners, ARC, Monorepos & Releases