unified-memory-framework icon indicating copy to clipboard operation
unified-memory-framework copied to clipboard

[CI] Cleaning self-hosted runners

Open KFilipek opened this issue 1 year ago • 0 comments

[CI] Cleaning self-hosted runners

Rationale

There is a need to harden self-hosted runners. Typically there are a few ways to do that:

  • Pre/post hook-scripts (https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/running-scripts-before-or-after-a-job)
  • ARC with ephemeral runners enabled
  • Volatile VMs with ephemeral runners (just-in-time registration of runners)
  • Other inspirational approaches: https://jonico.github.io/awesome-runners/

From my point of view, the first option is the easiest to adopt, just one shell script with passing as an input when running a runner. ACTIONS_RUNNER_HOOK_JOB_STARTED=cleaning_script.sh ACTIONS_RUNNER_HOOK_JOB_COMPLETED=cleaning_script.sh ./run.sh

Description

API Changes

None, transparent from the workflow point of view.

Implementation details

Depending on the chosen approach, other implementation requirements will be mostly related to the infrastructure setup.

Meta

KFilipek avatar Jul 23 '24 10:07 KFilipek