Table of Contents

Class GitHub.Variables

Namespace
Invex.Atom.Module.GitHubWorkflows
Assembly
Invex.Atom.Module.GitHubWorkflows.dll

Provides access to GitHub Actions environment variables as strongly-typed properties.

public static class GitHub.Variables
Inheritance
object
GitHub.Variables

Remarks

Each property corresponds to a GitHub Actions environment variable, returning its value or an empty string if the variable is not set.

Properties

Actions

Gets the value of the GITHUB_ACTIONS environment variable.

public static string Actions { get; }

Property Value

string

Examples

true

Actor

Gets the value of the GITHUB_ACTOR environment variable.

public static string Actor { get; }

Property Value

string

Examples

ArthurDent

ActorId

Gets the value of the GITHUB_ACTOR_ID environment variable.

public static string ActorId { get; }

Property Value

string

Examples

1234567

ApiUrl

Gets the value of the GITHUB_API_URL environment variable.

public static string ApiUrl { get; }

Property Value

string

Examples

https://api.github.com

BaseRef

Gets the value of the GITHUB_BASE_REF environment variable.

public static string BaseRef { get; }

Property Value

string

Examples

main

Env

Gets the value of the GITHUB_ENV environment variable.

public static string Env { get; }

Property Value

string

Examples

/home/runner/work/_temp/runner_file_commands/set_env[GUID]

EventName

Gets the value of the GITHUB_EVENT_NAME environment variable.

public static string EventName { get; }

Property Value

string

Examples

pull_request

EventPath

Gets the value of the GITHUB_EVENT_PATH environment variable.

public static string EventPath { get; }

Property Value

string

Examples

/home/runner/work/_temp/_github_workflow/event.json

GraphqlUrl

Gets the value of the GITHUB_GRAPHQL_URL environment variable.

public static string GraphqlUrl { get; }

Property Value

string

Examples

https://api.github.com/graphql

HeadRef

Gets the value of the GITHUB_HEAD_REF environment variable.

public static string HeadRef { get; }

Property Value

string

Examples

my-branch

Job

Gets the value of the GITHUB_JOB environment variable.

public static string Job { get; }

Property Value

string

Examples

BuildApp

Output

Gets the value of the GITHUB_OUTPUT environment variable.

public static string Output { get; }

Property Value

string

Examples

/home/runner/work/_temp/runner_file_commands/set_output[GUID]

Path

Gets the value of the GITHUB_PATH environment variable.

public static string Path { get; }

Property Value

string

Examples

/home/runner/work/_temp/runner_file_commands/add_path[GUID]

Ref

Gets the value of the GITHUB_REF environment variable.

public static string Ref { get; }

Property Value

string

Examples

refs/pull/4/merge

RefName

Gets the value of the GITHUB_REF_NAME environment variable.

public static string RefName { get; }

Property Value

string

Examples

4/my-branch

RefProtected

Gets the value of the GITHUB_REF_PROTECTED environment variable.

public static string RefProtected { get; }

Property Value

string

Examples

false

RefType

Gets the value of the GITHUB_REF_TYPE environment variable.

public static string RefType { get; }

Property Value

string

Examples

branch

Repository

Gets the value of the GITHUB_REPOSITORY environment variable.

public static string Repository { get; }

Property Value

string

Examples

ArthurDent/my-project

RepositoryId

Gets the value of the GITHUB_REPOSITORY_ID environment variable.

public static string RepositoryId { get; }

Property Value

string

Examples

123456789

RepositoryOwner

Gets the value of the GITHUB_REPOSITORY_OWNER environment variable.

public static string RepositoryOwner { get; }

Property Value

string

Examples

ArthurDent

RepositoryOwnerId

Gets the value of the GITHUB_REPOSITORY_OWNER_ID environment variable.

public static string RepositoryOwnerId { get; }

Property Value

string

Examples

1234567

RetentionDays

Gets the value of the GITHUB_RETENTION_DAYS environment variable.

public static string RetentionDays { get; }

Property Value

string

Examples

90

RunAttempt

Gets the value of the GITHUB_RUN_ATTEMPT environment variable.

public static string RunAttempt { get; }

Property Value

string

Examples

1

RunId

Gets the value of the GITHUB_RUN_ID environment variable.

public static string RunId { get; }

Property Value

string

Examples

9876543210

RunNumber

Gets the value of the GITHUB_RUN_NUMBER environment variable.

public static string RunNumber { get; }

Property Value

string

Examples

1

RunnerArch

Gets the value of the RUNNER_ARCH environment variable.

public static string RunnerArch { get; }

Property Value

string

Examples

X64

RunnerDebug

Gets the value of the RUNNER_DEBUG environment variable.

public static string RunnerDebug { get; }

Property Value

string

Examples

1

RunnerEnvironment

Gets the value of the RUNNER_ENVIRONMENT environment variable.

public static string RunnerEnvironment { get; }

Property Value

string

Examples

github-hosted

RunnerName

Gets the value of the RUNNER_NAME environment variable.

public static string RunnerName { get; }

Property Value

string

Examples

GitHubActions 6

RunnerOs

Gets the value of the RUNNER_OS environment variable.

public static string RunnerOs { get; }

Property Value

string

Examples

Linux

RunnerPerfLog

Gets the value of the RUNNER_PERFLOG environment variable.

public static string RunnerPerfLog { get; }

Property Value

string

Examples

/home/runner/perflog

RunnerTemp

Gets the value of the RUNNER_TEMP environment variable.

public static string RunnerTemp { get; }

Property Value

string

Examples

/home/runner/work/_temp

RunnerToolCache

Gets the value of the RUNNER_TOOL_CACHE environment variable.

public static string RunnerToolCache { get; }

Property Value

string

Examples

/opt/hostedtoolcache

RunnerTrackingId

Gets the value of the RUNNER_TRACKING_ID environment variable.

public static string RunnerTrackingId { get; }

Property Value

string

Examples

github_3cf77bfa-2ce5-4b4c-b736-d6a7b5c16537

RunnerUser

Gets the value of the RUNNER_USER environment variable.

public static string RunnerUser { get; }

Property Value

string

Examples

runner

RunnerWorkspace

Gets the value of the RUNNER_WORKSPACE environment variable.

public static string RunnerWorkspace { get; }

Property Value

string

Examples

/home/runner/work/my-project

ServerUrl

Gets the value of the GITHUB_SERVER_URL environment variable.

public static string ServerUrl { get; }

Property Value

string

Examples

https://github.com

Sha

Gets the value of the GITHUB_SHA environment variable.

public static string Sha { get; }

Property Value

string

Examples

[SHA]

State

Gets the value of the GITHUB_STATE environment variable.

public static string State { get; }

Property Value

string

Examples

/home/runner/work/_temp/runner_file_commands/save_state[GUID]

StepSummary

Gets the value of the GITHUB_STEP_SUMMARY environment variable.

public static string StepSummary { get; }

Property Value

string

Examples

/home/runner/work/_temp/runner_file_commands/step_summary[GUID]

TriggeringActor

Gets the value of the GITHUB_TRIGGERING_ACTOR environment variable.

public static string TriggeringActor { get; }

Property Value

string

Examples

ArthurDent

Workflow

Gets the value of the GITHUB_WORKFLOW environment variable.

public static string Workflow { get; }

Property Value

string

Examples

build

WorkflowRef

Gets the value of the GITHUB_WORKFLOW_REF environment variable.

public static string WorkflowRef { get; }

Property Value

string

Examples

ArthurDent/my-project/.github/workflows/BuildApp.yml@refs/pull/4/merge

WorkflowSha

Gets the value of the GITHUB_WORKFLOW_SHA environment variable.

public static string WorkflowSha { get; }

Property Value

string

Examples

[SHA]

Workspace

Gets the value of the GITHUB_WORKSPACE environment variable.

public static string Workspace { get; }

Property Value

string

Examples

/home/runner/work/my-project/my-project