You can use job management hooks for self-hosted runners. Please set script file to your runner image.
ACTIONS_RUNNER_HOOK_JOB_STARTED
:/myshoes-actions-runner-hook-job-started.sh
ACTIONS_RUNNER_HOOK_JOB_COMPLETED
:/myshoes-actions-runner-hook-job-completed.sh