Variable | Description | Example |
---|---|---|
CI |
Always set to true |
|
GITHUB_ACTION |
The name of the action currently running | |
GITHUB_ACTION_PATH |
The path where an action is located, only supported in composite actions. | /home/runner/work/_actions/repo-owner/name-of-action-repo/v1 |
GITHUB_ACTION_REPOSITORY |
The owner and repository name of the action. | actions/checkout |
GITHUB_ACTIONS |
Always set to true when GitHub Actions is running the workflow. |
|
GITHUB_ACTOR |
The name of the person or app that initiated the workflow. | octocat |
GITHUB_ACTOR_ID |
The account ID of the person or app that triggered the initial workflow run. | 1234567 |
GITHUB_API_URL |
Returns the API URL. | https://api.github.com |
GITHUB_BASE_REF |
The name of the base ref or target branch of the pull request in a workflow run. | main |
GITHUB_ENV |
The path on the runner to the file that sets variables from workflow commands | /home/runner/work/_temp/_runner_file_commands/set_env_87406d6e-4979-4d42-98e1-3dab1f48b13a |
GITHUB_EVENT_NAME |
The name of the event that triggered the workflow. | workflow_dispatch |
GITHUB_EVENT_PATH |
The path to the file on the runner that contains the full event webhook payload. | /github/workflow/event.json |
GITHUB_GRAPHQL_URL |
Returns the GraphQL API URL. | https://api.github.com/graphql |
GITHUB_HEAD_REF |
The head ref or source branch of the pull request in a workflow run | feature-branch-1 |
GITHUB_JOB |
The job_id of the current job. | greeting_job |
GITHUB_OUTPUT |
The path on the runner to the file that sets the current step's outputs from workflow commands | /home/runner/work/_temp/_runner_file_commands/set_output_a50ef383-b063-46d9-9157-57953fc9f3f0 |
GITHUB_PATH |
The path on the runner to the file that sets system PATH variables from workflow commands |
/home/runner/work/_temp/_runner_file_commands/add_path_899b9445-ad4a-400c-aa89-249f18632cf5 |
GITHUB_REF |
||
The fully-formed ref of the branch or tag that triggered the workflow run. | refs/heads/feature-branch-1 |
|
GITHUB_REF_NAME |
The short ref name of the branch or tag that triggered the workflow run | feature-branch-1 |
GITHUB_REF_PROTECTED |
true if branch protections or rulesets are configured for the ref that triggered the workflow run |
true |
GITHUB_REF_TYPE |
The type of ref that triggered the workflow run | branch or tag |
GITHUB_REPOSITORY |
The owner and repository name | octocat/Hello-World |
GITHUB_REPOSITORY_ID |
The ID of the repository. | 123456789 |
GITHUB_REPOSITORY_OWNER |
The repository owner's name. | octocat |
GITHUB_REPOSITORY_OWNER_ID |
The repository owner's account ID | 1234567 |
GITHUB_RETENTION_DAYS |
The number of days that workflow run logs and artifacts are kept | 90 |
GITHUB_RUN_ATTEMPT |
A unique number for each attempt of a particular workflow run in a repository | 3 |
GITHUB_RUN_ID |
A unique number for each workflow run within a repository | 1658821493 |
GITHUB_RUN_NUMBER |
A unique number for each run of a particular workflow in a repository | 3 |
GITHUB_SERVER_URL |
The URL of the GitHub server. | https://github.com |
GITHUB_SHA |
The commit SHA that triggered the workflow | ffac537e6cbbf934b08745a378932722df287a53 |
GITHUB_STEP_SUMMARY |
The path on the runner to the file that contains job summaries from workflow commands | /home/runner/_layout/_work/_temp/_runner_file_commands/step_summary_1cb22d7f-5663-41a8-9ffc-13472605c76c |
GITHUB_TRIGGERING_ACTOR |
The username of the user that initiated the workflow run | |
GITHUB_WORKFLOW |
The name of the workflow. | My test workflow |
GITHUB_WORKFLOW_REF |
The ref path to the workflow. | octocat/hello-world/.github/workflows/my-workflow.yml@refs/heads/my_branch |
GITHUB_WORKFLOW_SHA |
The commit SHA for the workflow file | b16dc47deadbeefdeafbeefbeefdeadbeebaad0d |
GITHUB_WORKSPACE |
The default working directory on the runner when using actions/checkout |
/home/runner/work/my-repo-name/my-repo-name |
RUNNER_ARCH |
The architecture of the runner executing the job | X86 |
RUNNER_DEBUG |
This is set only if debug logging is enabled | 1 |
RUNNER_NAME |
The name of the runner executing the job | Hosted Agent |
RUNNER_OS |
The operating system of the runner executing the job | Linux |
RUNNER_TEMP |
The path to a temporary directory on the runner | D:\a\_temp |
RUNNER_TOOL_CACHE |
The path to the directory containing preinstalled tools for GitHub-hosted runners | C:\hostedtoolcache\windows |
https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables