actions / actions/actions-runner-controller
Document job hook scripts
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 1.5k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 27
Description
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
- You can see here how one person tripped over this confusing documentation, preventing the installed scripts from being executed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading runner/startup.sh and the job-started.sh and job-completed.sh hook scripts linked in the issue. Verify how the environment variables interact with the existing hooks directories, then document the trade-offs and the /etc/arc/hooks/job-started.d/ and /etc/arc/hooks/job-completed.d/ alternatives. Done means users can choose an approach without unintentionally disabling installed scripts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, kubernetes, shell
- Domain
- devops, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100