ProcessEnv
Defined in: environment.d.ts:5
Extends
Section titled “Extends”GitHubEnvironments
Properties
Section titled “Properties”readonly CI: "true";Defined in: environment.d.ts:11
Always set to true.
Inherited from
Section titled “Inherited from”GitHubEnvironments.CIGITHUB_ACTION
Section titled “GITHUB_ACTION”readonly GITHUB_ACTION: string;Defined in: environment.d.ts:24
The name of the action currently running, or the id of a step. For
example, for an action, __repo-owner_name-of-action-repo. GitHub
removes special characters, and uses the name __run when the current
step runs a script without an id. If you use the same script or action
more than once in the same job, the name will include a suffix that
consists of the sequence number preceded by an underscore. For example,
the first script you run will have the name __run, and the second
script will be named __run_2. Similarly, the second invocation of
actions/checkout will be actionscheckout2.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_ACTIONGITHUB_ACTION_PATH
Section titled “GITHUB_ACTION_PATH”readonly GITHUB_ACTION_PATH: string;Defined in: environment.d.ts:32
The path where an action is located. This property is only supported in composite actions. You can use this path to change directories to where the action is located and access other files in that same repository. For example, /home/runner/work/_actions/repo-owner/name-of-action-repo/v1.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_ACTION_PATHGITHUB_ACTION_REPOSITORY
Section titled “GITHUB_ACTION_REPOSITORY”readonly GITHUB_ACTION_REPOSITORY: string;Defined in: environment.d.ts:38
For a step executing an action, this is the owner and repository name of
the action. For example, actions/checkout.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_ACTION_REPOSITORYGITHUB_ACTOR
Section titled “GITHUB_ACTOR”readonly GITHUB_ACTOR: string;Defined in: environment.d.ts:44
The name of the person or app that initiated the workflow. For example,
stephansama.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_ACTORGITHUB_ACTOR_ID
Section titled “GITHUB_ACTOR_ID”readonly GITHUB_ACTOR_ID: string;Defined in: environment.d.ts:51
The account ID of the person or app that triggered the initial workflow
run. For example, 1234567. Note that this is different from the actor
username.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_ACTOR_IDGITHUB_API_URL
Section titled “GITHUB_API_URL”readonly GITHUB_API_URL: string;Defined in: environment.d.ts:54
Returns the API URL. For example: https://api.github.com.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_API_URLGITHUB_BASE_REF?
Section titled “GITHUB_BASE_REF?”readonly optional GITHUB_BASE_REF?: string;Defined in: environment.d.ts:62
The name of the base ref or target branch of the pull request in a
workflow run. This is only set when the event that triggers a workflow
run is either pull_request or pull_request_target. For example,
main.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_BASE_REFGITHUB_ENV
Section titled “GITHUB_ENV”readonly GITHUB_ENV: string;Defined in: environment.d.ts:72
The path on the runner to the file that sets variables from workflow
commands. The path to this file is unique to the current step and changes
for each step in a job. For example,
/home/runner/work/_temp/_runner_file_commands/set_env_87406d6e-4979-4d42-98e1-3dab1f48b13a.
For more information, see Workflow commands for GitHub
Actions.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_ENVGITHUB_EVENT_NAME
Section titled “GITHUB_EVENT_NAME”readonly GITHUB_EVENT_NAME: string;Defined in: environment.d.ts:78
The name of the event that triggered the workflow. For example,
workflow_dispatch.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_EVENT_NAMEGITHUB_EVENT_PATH
Section titled “GITHUB_EVENT_PATH”readonly GITHUB_EVENT_PATH: string;Defined in: environment.d.ts:84
The path to the file on the runner that contains the full event webhook
payload. For example, /github/workflow/event.json.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_EVENT_PATHGITHUB_GRAPHQL_URL
Section titled “GITHUB_GRAPHQL_URL”readonly GITHUB_GRAPHQL_URL: string;Defined in: environment.d.ts:90
Returns the GraphQL API URL. For example:
https://api.github.com/graphql.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_GRAPHQL_URLGITHUB_HEAD_REF?
Section titled “GITHUB_HEAD_REF?”readonly optional GITHUB_HEAD_REF?: string;Defined in: environment.d.ts:98
The head ref or source branch of the pull request in a workflow run. This
property is only set when the event that triggers a workflow run is
either pull_request or pull_request_target. For example,
feature-branch-1.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_HEAD_REFGITHUB_JOB
Section titled “GITHUB_JOB”readonly GITHUB_JOB: string;Defined in: environment.d.ts:101
The job_id of the current job. For example, greeting_job.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_JOBGITHUB_OUTPUT
Section titled “GITHUB_OUTPUT”readonly GITHUB_OUTPUT: string;Defined in: environment.d.ts:111
The path on the runner to the file that sets the current step’s outputs
from workflow commands. The path to this file is unique to the current
step and changes for each step in a job. For example,
/home/\*\*/set_output_a50. For more information, see Workflow
commands for GitHub
Actions.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_OUTPUTGITHUB_PATH
Section titled “GITHUB_PATH”readonly GITHUB_PATH: string;Defined in: environment.d.ts:121
The path on the runner to the file that sets system PATH variables from
workflow commands. The path to this file is unique to the current step
and changes for each step in a job. For example,
/home/runner/work/_temp/_runner_file_commands/add_path_899b9445-ad4a-400c-aa89-249f18632cf5.
For more information, see Workflow commands for GitHub
Actions.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_PATHGITHUB_REF?
Section titled “GITHUB_REF?”readonly optional GITHUB_REF?: string;Defined in: environment.d.ts:137
The fully-formed ref of the branch or tag that triggered the workflow
run. For workflows triggered by push, this is the branch or tag ref
that was pushed. For workflows triggered by pull_request, this is the
pull request merge branch. For workflows triggered by release, this is
the release tag created. For other triggers, this is the branch or tag
ref that triggered the workflow run. This is only set if a branch or tag
is available for the event type. The ref given is fully-formed, meaning
that for branches the format is refs/heads/<branch_name>. For pull
requests events except pull_request_target, it is
refs/pull/<pr_number>/merge. pull_request_target events have the ref
from the base branch. For tags it is refs/tags/<tag_name>. For example,
refs/heads/feature-branch-1.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_REFGITHUB_REF_NAME
Section titled “GITHUB_REF_NAME”readonly GITHUB_REF_NAME: string;Defined in: environment.d.ts:145
The short ref name of the branch or tag that triggered the workflow run.
This value matches the branch or tag name shown on GitHub. For example,
feature-branch-1. For pull requests, the format is
<pr_number>/merge.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_REF_NAMEGITHUB_REF_PROTECTED?
Section titled “GITHUB_REF_PROTECTED?”readonly optional GITHUB_REF_PROTECTED?: "true";Defined in: environment.d.ts:151
true if branch protections or rulesets are configured for the ref that
triggered the workflow run.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_REF_PROTECTEDGITHUB_REF_TYPE?
Section titled “GITHUB_REF_TYPE?”readonly optional GITHUB_REF_TYPE?: "branch" | "tag";Defined in: environment.d.ts:157
The type of ref that triggered the workflow run. Valid values are
branch or tag.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_REF_TYPEGITHUB_REPOSITORY
Section titled “GITHUB_REPOSITORY”readonly GITHUB_REPOSITORY: string;Defined in: environment.d.ts:160
The owner and repository name. For example, stephansama/actions.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_REPOSITORYGITHUB_REPOSITORY_ID
Section titled “GITHUB_REPOSITORY_ID”readonly GITHUB_REPOSITORY_ID: string;Defined in: environment.d.ts:166
The ID of the repository. For example, 123456789. Note that this is
different from the repository name
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_REPOSITORY_IDGITHUB_REPOSITORY_OWNER
Section titled “GITHUB_REPOSITORY_OWNER”readonly GITHUB_REPOSITORY_OWNER: string;Defined in: environment.d.ts:169
The repository owner’s name. For example, stephansama.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_REPOSITORY_OWNERGITHUB_REPOSITORY_OWNER_ID
Section titled “GITHUB_REPOSITORY_OWNER_ID”readonly GITHUB_REPOSITORY_OWNER_ID: string;Defined in: environment.d.ts:175
The repository owner’s account ID. For example, 1234567. Note that this
is different from the owner’s name.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_REPOSITORY_OWNER_IDGITHUB_RETENTION_DAYS
Section titled “GITHUB_RETENTION_DAYS”readonly GITHUB_RETENTION_DAYS: string;Defined in: environment.d.ts:181
The number of days that workflow run logs and artifacts are kept. For
example, 90.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_RETENTION_DAYSGITHUB_RUN_ATTEMPT
Section titled “GITHUB_RUN_ATTEMPT”readonly GITHUB_RUN_ATTEMPT: string;Defined in: environment.d.ts:188
A unique number for each attempt of a particular workflow run in a
repository. This number begins at 1 for the workflow run’s first
attempt, and increments with each re-run. For example, 3.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_RUN_ATTEMPTGITHUB_RUN_ID
Section titled “GITHUB_RUN_ID”readonly GITHUB_RUN_ID: string;Defined in: environment.d.ts:195
A unique number for each workflow run within a repository. This number
does not change if you re-run the workflow run. For example,
1658821493
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_RUN_IDGITHUB_RUN_NUMBER
Section titled “GITHUB_RUN_NUMBER”readonly GITHUB_RUN_NUMBER: string;Defined in: environment.d.ts:203
A unique number for each run of a particular workflow in a repository.
This number begins at 1 for the workflow’s first run, and increments
with each new run. This number does not change if you re-run the workflow
run. For example, 3.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_RUN_NUMBERGITHUB_SERVER_URL
Section titled “GITHUB_SERVER_URL”readonly GITHUB_SERVER_URL: string;Defined in: environment.d.ts:206
The URL of the GitHub server. For example: https://github.com.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_SERVER_URLGITHUB_SHA
Section titled “GITHUB_SHA”readonly GITHUB_SHA: string;Defined in: environment.d.ts:215
The commit SHA that triggered the workflow. The value of this commit SHA
depends on the event that triggered the workflow. For more information,
see Events that trigger
workflows.
For example, ffac537e6cbbf934b08745a378932722df287a53.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_SHAGITHUB_STEP_SUMMARY
Section titled “GITHUB_STEP_SUMMARY”readonly GITHUB_STEP_SUMMARY: string;Defined in: environment.d.ts:225
The path on the runner to the file that contains job summaries from
workflow commands. The path to this file is unique to the current step
and changes for each step in a job. For example,
/home/runner/_layout/_work/_temp/_runner_file_commands/step_summary_1cb22d7f-5663-41a8-9ffc-13472605c76c.
For more information, see Workflow commands for GitHub
Actions.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_STEP_SUMMARYGITHUB_TRIGGERING_ACTOR
Section titled “GITHUB_TRIGGERING_ACTOR”readonly GITHUB_TRIGGERING_ACTOR: string;Defined in: environment.d.ts:234
The username of the user that initiated the workflow run. If the workflow
run is a re-run, this value may differ from github.actor. Any workflow
re-runs will use the privileges of github.actor, even if the actor
initiating the re-run (github.triggering_actor) has different
privileges.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_TRIGGERING_ACTORGITHUB_WORKFLOW
Section titled “GITHUB_WORKFLOW”readonly GITHUB_WORKFLOW: string;Defined in: environment.d.ts:241
The name of the workflow. For example, My test workflow. If the
workflow file doesn’t specify a name, the value of this variable is the
full path of the workflow file in the repository.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_WORKFLOWGITHUB_WORKFLOW_REF
Section titled “GITHUB_WORKFLOW_REF”readonly GITHUB_WORKFLOW_REF: string;Defined in: environment.d.ts:247
The ref path to the workflow. For example,
stephansama/packages/.github/workflows/my-workflow.yml@refs/heads/my_branch.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_WORKFLOW_REFGITHUB_WORKFLOW_SHA
Section titled “GITHUB_WORKFLOW_SHA”readonly GITHUB_WORKFLOW_SHA: string;Defined in: environment.d.ts:250
The commit SHA for the workflow file.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_WORKFLOW_SHAGITHUB_WORKSPACE
Section titled “GITHUB_WORKSPACE”readonly GITHUB_WORKSPACE: string;Defined in: environment.d.ts:257
The default working directory on the runner for steps, and the default
location of your repository when using the checkout action. For example,
/home/runner/work/my-repo-name/my-repo-name.
Inherited from
Section titled “Inherited from”GitHubEnvironments.GITHUB_WORKSPACERUNNER_ARCH
Section titled “RUNNER_ARCH”readonly RUNNER_ARCH: "ARM64" | "ARM" | "X64" | "X86";Defined in: environment.d.ts:263
The architecture of the runner executing the job. Possible values are
X86, X64, ARM, or ARM64.
Inherited from
Section titled “Inherited from”GitHubEnvironments.RUNNER_ARCHRUNNER_DEBUG?
Section titled “RUNNER_DEBUG?”readonly optional RUNNER_DEBUG?: "1";Defined in: environment.d.ts:271
This is set only if debug logging is enabled, and always has the value of
- It can be useful as an indicator to enable additional debugging or verbose logging in your own job steps.
Inherited from
Section titled “Inherited from”GitHubEnvironments.RUNNER_DEBUGRUNNER_ENVIRONMENT
Section titled “RUNNER_ENVIRONMENT”readonly RUNNER_ENVIRONMENT: "github-hosted" | "self-hosted";Defined in: environment.d.ts:279
The environment of the runner executing the job. Possible values are:
github-hosted for GitHub-hosted runners provided by GitHub, and
self-hosted for self-hosted runners configured by the repository
owner.
Inherited from
Section titled “Inherited from”GitHubEnvironments.RUNNER_ENVIRONMENTRUNNER_NAME
Section titled “RUNNER_NAME”readonly RUNNER_NAME: string;Defined in: environment.d.ts:286
The name of the runner executing the job. This name may not be unique in
a workflow run as runners at the repository and organization levels could
use the same name. For example, Hosted Agent
Inherited from
Section titled “Inherited from”GitHubEnvironments.RUNNER_NAMERUNNER_OS
Section titled “RUNNER_OS”readonly RUNNER_OS: "Linux" | "macOS" | "Windows";Defined in: environment.d.ts:292
The operating system of the runner executing the job. Possible values are
Linux, Windows, or macOS. For example, Windows
Inherited from
Section titled “Inherited from”GitHubEnvironments.RUNNER_OSRUNNER_TEMP
Section titled “RUNNER_TEMP”readonly RUNNER_TEMP: string;Defined in: environment.d.ts:300
The path to a temporary directory on the runner. This directory is
emptied at the beginning and end of each job. Note that files will not be
removed if the runner’s user account does not have permission to delete
them. For example, D:\a\_temp
Inherited from
Section titled “Inherited from”GitHubEnvironments.RUNNER_TEMPRUNNER_TOOL_CACHE
Section titled “RUNNER_TOOL_CACHE”readonly RUNNER_TOOL_CACHE: string;Defined in: environment.d.ts:308
The path to the directory containing preinstalled tools for GitHub-hosted
runners. For more information, see GitHub-hosted
runners.
For example, C:\hostedtoolcache\windows
Inherited from
Section titled “Inherited from”GitHubEnvironments.RUNNER_TOOL_CACHE