Skip to content
Latchkey

What Is GITHUB_WORKSPACE?

GITHUB_WORKSPACE is the absolute path to the working directory where actions/checkout places your code.

Most steps run with GITHUB_WORKSPACE as the working directory. Understanding it matters when a step changes directories, runs in a container, or references absolute paths.

What to know

  • Default value like /home/runner/work/<repo>/<repo>
  • actions/checkout populates it
  • Container actions mount it at a different path

Gotcha

Inside a container job the workspace may be mounted at /github/workspace, so avoid hard-coding the host path.

Key takeaways

  • GITHUB_WORKSPACE is where your repo is checked out.
  • actions/checkout fills it.
  • Container jobs mount it at a different path.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →