What environment variable points to the directory where tool installations (Node.js, Python, Java) are cached on GitHub-hosted runners?
Select an answer to reveal the explanation.
Short Explanation and Infographic
RUNNER_TOOL_CACHE is the speed depot — setup actions install tools here so subsequent runs or jobs can find them without re-downloading.
Full explanation below image
Full Explanation
The 'RUNNER_TOOL_CACHE' environment variable (also accessible as '${{ runner.tool_cache }}' in expressions) points to the directory where cached tool versions are stored. Setup actions like actions/setup-node and actions/setup-python use this directory to store installed versions of Node.js, Python, Java, Go, etc. If the requested version is already in the tool cache, the setup action uses it without downloading. On GitHub-hosted runners, each runner has a pre-populated tool cache with common versions. On self-hosted runners, the tool cache persists between jobs on the same runner (if not ephemeral).