GH-100 · Question #48
GH-100 Question #48: Real Exam Question with Answer & Explanation
The correct answer is A: Execute scripts before and after a job. Self-hosted runners support runner hooks - shell scripts that execute automatically before and after every job via environment variables like ACTIONS_RUNNER_HOOK_JOB_STARTED and ACTIONS_RUNNER_HOOK_JOB_COMPLETED. This capability is exclusively available to self-hosted runner admi
Question
Which feature is unique to self-hosted runners?
Options
- AExecute scripts before and after a job
- BDynamic scaling
- CAutomatic updates to the operating system
- DGPU support
Explanation
Self-hosted runners support runner hooks - shell scripts that execute automatically before and after every job via environment variables like ACTIONS_RUNNER_HOOK_JOB_STARTED and ACTIONS_RUNNER_HOOK_JOB_COMPLETED. This capability is exclusively available to self-hosted runner administrators and has no equivalent on GitHub-hosted runners, making A the correct answer.
Why the distractors are wrong:
- B (Dynamic scaling): This is a built-in characteristic of GitHub-hosted runners, which spin up and tear down on demand. Self-hosted runners require manual setup (e.g., actions-runner-controller) to scale dynamically - it's not unique to them.
- C (Automatic OS updates): This applies to GitHub-hosted runners, not self-hosted. Self-hosted runners require you to manage and patch the OS yourself, which is a common maintenance burden.
- D (GPU support): Both runner types can support GPUs - GitHub now offers GPU-equipped larger runners, so this is not exclusive to self-hosted.
Memory tip: Think of self-hosted runners as "your server, your rules" - the one thing only you can configure on your own infrastructure is running custom hook scripts around jobs. GitHub can't give you that control on their managed runners.
Topics
Community Discussion
No community discussion yet for this question.