Following the current documentation results in unexpected and undocumented loss of features. Adequate documentation would explain the trade-offs of losing these features and offer the alternative of adding scripts to the relevant directory.
Additional context
You can see here how one person tripped over this confusing documentation, preventing the installed scripts from being executed.
What would you like added?
The GitHub Docs document hooks to configure scripts to run before or after a job, by setting environment variables that point to scripts to run. This would suggest people could set and use those variables directly. However, the runner is already using them: https://github.com/actions/actions-runner-controller/blob/9afd93065fa8b1f87296f0dcdf0c2753a0548cb7/runner/startup.sh#L11-L12
It is unclear what the consequences would be of setting the environment variables to some other value, and thus not executing the expected scripts.
Furthermore, the provided scripts already provide a different mechanism for adding scripts to run,
/etc/arc/hooks/job-started.d/
and/etc/arc/hooks/job-completed.d/
, but that is not documented anywhere.Why is this needed?
Following the current documentation results in unexpected and undocumented loss of features. Adequate documentation would explain the trade-offs of losing these features and offer the alternative of adding scripts to the relevant directory.
Additional context