What directory does the GITHUB_WORKSPACE environment variable point to?
Select an answer to reveal the explanation.
Short Explanation and Infographic
GITHUB_WORKSPACE is home base for your code — it's where actions/checkout drops your repository files by default.
Full explanation below image
Full Explanation
GITHUB_WORKSPACE contains the path to the default working directory on the runner, which is where actions/checkout checks out your repository. On GitHub-hosted Ubuntu runners, this is typically '/home/runner/work/{repo-name}/{repo-name}'. Steps use this directory as their default working directory. The runner installation is at '/opt/hostedtoolcache' (not GITHUB_WORKSPACE). The temporary directory is at RUNNER_TEMP (e.g., '/home/runner/work/_temp'). The runner home is '/home/runner'. GITHUB_WORKSPACE is often used to construct absolute paths to files in the repository.