Documentation / Reference / Environment Variables
Environment Variables
Variables automatically available inside your WorkerRun jobs.
| Variable | Value | Description |
|---|---|---|
| GITHUB_TOKEN | <token> | GitHub App installation token (scoped to the repository) |
| GITHUB_REPOSITORY | owner/repo | Full repository name (owner/repo) |
| GITHUB_ACTOR | username | Username of the user that triggered the workflow |
| GITHUB_SHA | 40-char hex | The commit SHA that triggered the workflow |
| GITHUB_REF | refs/heads/main | The branch or tag ref that triggered the workflow |
| GITHUB_REF_NAME | main | Short ref name (branch or tag name) |
| GITHUB_REF_TYPE | branch | Type of ref: branch or tag |
| GITHUB_WORKFLOW | CI | Name of the workflow |
| GITHUB_RUN_ID | integer | Unique ID for the workflow run |
| GITHUB_RUN_NUMBER | integer | Sequential run number for the workflow |
| GITHUB_EVENT_NAME | push | Name of the event that triggered the workflow |
| GITHUB_JOB | build | Job ID of the current job |
| GITHUB_SERVER_URL | https://github.com | URL of the GitHub server |
| GITHUB_API_URL | https://api.github.com | URL of the GitHub REST API |
| GITHUB_GRAPHQL_URL | https://api.github.com/graphql | URL of the GitHub GraphQL API |
| GITHUB_WORKSPACE | /home/runner/work/repo | Default working directory |
| GITHUB_ACTION | run1 | Unique identifier of the current action |
| GITHUB_BASE_REF | main | Target branch of a pull request (pull_request events only) |
| GITHUB_HEAD_REF | feat/my-feature | Source branch of a pull request (pull_request events only) |
| GITHUB_ACTION_REPOSITORY | owner/my-action | Owner and repository name of the action being run |
| GITHUB_OUTPUT | (file path) | Path to the file used by the set-output file command (steps write key=value pairs) |
| GITHUB_ENV | (file path) | Path to the file used to export environment variables to subsequent steps |
| GITHUB_STATE | (file path) | Path to the file used by pre/post lifecycle hooks to share state via save-state/get-state |
| GITHUB_PATH | (file path) | Path to the file used to prepend directories to the system PATH for subsequent steps |
| GITHUB_STEP_SUMMARY | (file path) | Path to the file for writing job step summaries (Markdown content, silently discarded in V8 mode) |
| ACTIONS_RUNTIME_URL | (URL) | Base URL of the GitHub Actions runtime service (used by @actions/artifact and similar) |
| ACTIONS_RUNTIME_TOKEN | (token) | Bearer token for authenticating with the GitHub Actions runtime service |
| ACTIONS_RESULTS_URL | (URL) | URL of the GitHub Actions Results Service V2 (used for live log streaming) |
| RUNNER_OS | Linux | Operating system of the runner (always Linux for WorkerRun) |
| RUNNER_ARCH | X64 | Architecture of the runner (always X64 for WorkerRun) |
| RUNNER_NAME | workerrun | Name of the runner |
| RUNNER_TEMP | /tmp | Temporary directory path |
| RUNNER_TOOL_CACHE | /opt/hostedtoolcache | Tool cache directory path |
| RUNNER_ENVIRONMENT | github-hosted | Runner environment identifier (always github-hosted for WorkerRun) |
| RUNNER_DEBUG | 0 | Set to 1 when debug logging is enabled |
V8 Isolation Mode (runs-on: worker-run): These variables are available via process.env in Node.js actions and as environment variables in run: steps.
Container Mode (runs-on: worker-run/instance-type=lite|basic|standard-*): These are full environment variables available in any step, including shell scripts and third-party tools.
Tip: When using @actions/github, prefer context.* helpers such as context.repo and context.sha over reading the underlying environment variables directly.