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 #1039

Open
catscanner opened this issue May 9, 2024 · 2 comments
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-node should read the AGENT_TOOLSDIRECTORY environment variable and if it exists, sets the RUNNER_TOOL_CACHE variable equal to it

A GitHub support agent said:

I was able to get this to work by forking actions/setup-node and copying the same implementation on actions/setup-python to allow support for AGENT_TOOLSDIRECTORY on my fork - essentially just throwing in those few lines where the run function is defined here.

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 feature request and we will get back to you once we have some feedback on this :)

@th-le
Copy link

th-le commented May 10, 2024

Hi, I opened a PR for this, really appreciate if you could have a look, @aparnajyothi-y

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

3 participants