Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support env setting of AGENT_TOOLSDIRECTORY as in the setup-python action #631

Open
catscanner opened this issue May 9, 2024 · 1 comment
Labels
feature request New feature or request to improve the current logic

Comments

@catscanner
Copy link

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:

const toolcacheRoot = process.env['RUNNER_TOOL_CACHE'] ?? '';

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.

@catscanner catscanner added feature request New feature or request to improve the current logic needs triage labels May 9, 2024
@aparnajyothi-y
Copy link
Contributor

Hello @catscanner, Thank you for creating this issue and we will get back to you once we have some feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

2 participants