Interview Prep/GitHub Actions/Caching, Artifacts, Runners & ARC

What is an ephemeral runner, and why is it the production default?

IntermediateConceptCaching, Artifacts, Runners & ARC
Answer

--ephemeral means the runner takes exactly one job and then unregisters. Combined with a fresh VM or pod per job, there is no leftover state: no cached credentials, no poisoned tool cache, no files from another repo's job. Persistent runners leak secrets and artifacts between jobs and let one malicious job backdoor the machine for the next. Use JIT runners (POST /orgs/{org}/actions/runners/generate-jitconfig) to create single-use runners without a registration token on disk; ARC uses this internally.

All GitHub Actions questions Roadmap: GitHub Actions

More on Caching, Artifacts, Runners & ARC