Support env setting of AGENT_TOOLSDIRECTORY as in the setup-python action
Description: as in setup python
if (IS_MAC) {
process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
}
if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
}
core.debug(
`Python is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`
);
setup-java should read the AGENT_TOOLSDIRECTORY environment variable and if it exists, sets the RUNNER_TOOL_CACHE variable equal to it.
The logic is here: https://github.com/actions/setup-java/blob/a1c6c9c8677803c9f4bd31e0f15ac0844258f955/src/util.ts#L76
Justification: Other actions already support this declaration and we need to use it to populate a caching system we are building to avoid hitting GitHub.com so often to install programming languages.
Are you willing to submit a PR? possibly, I will need to check schedule with our engineering team.
Hello @catscanner, Thank you for creating this issue and we will get back to you once we have some feedback :)