Table of Contents

Class GitHubContexts

Namespace
Invex.StructuredText.GithubActions
Assembly
Invex.StructuredText.GithubActions.dll

Typed references to the github context and the other contexts available to expressions.

public sealed class GitHubContexts
Inheritance
object
GitHubContexts

Properties

Action

github.action: The name of the action currently running, or the id of a step.

public StringExpr Action { get; }

Property Value

StringExpr

ActionPath

github.action_path: The path where an action is located (composite actions only).

public StringExpr ActionPath { get; }

Property Value

StringExpr

ActionRef

github.action_ref: For a step executing an action, the ref of the action being executed.

public StringExpr ActionRef { get; }

Property Value

StringExpr

ActionRepository

github.action_repository: For a step executing an action, the owner and repository name of the action.

public StringExpr ActionRepository { get; }

Property Value

StringExpr

ActionStatus

github.action_status: For a composite action, the current result of the composite action.

public StringExpr ActionStatus { get; }

Property Value

StringExpr

Actor

github.actor: The username of the user that triggered the initial workflow run.

public StringExpr Actor { get; }

Property Value

StringExpr

ActorId

github.actor_id: The account id of the user that triggered the initial workflow run.

public StringExpr ActorId { get; }

Property Value

StringExpr

ApiUrl

github.api_url: The URL of the GitHub REST API.

public StringExpr ApiUrl { get; }

Property Value

StringExpr

BaseRef

github.base_ref: The base ref or target branch of the pull request (pull request events only).

public StringExpr BaseRef { get; }

Property Value

StringExpr

Context

github: The whole github context: information about the workflow run and the event that triggered it.

public JsonExpr Context { get; }

Property Value

JsonExpr

Env

env: Variables set in the workflow, job or step. Index by name: Env["NAME"].

public JsonExpr Env { get; }

Property Value

JsonExpr

Event

github.event: The full event webhook payload.

public GitHubContextsEventContext Event { get; }

Property Value

GitHubContextsEventContext

EventName

github.event_name: The name of the event that triggered the workflow run.

public StringExpr EventName { get; }

Property Value

StringExpr

EventPath

github.event_path: The path to the file on the runner that contains the full event webhook payload.

public StringExpr EventPath { get; }

Property Value

StringExpr

GitHubEnv

github.env: Path on the runner to the file that sets environment variables from workflow commands.

public StringExpr GitHubEnv { get; }

Property Value

StringExpr

GitHubJob

github.job: The job id of the current job.

public StringExpr GitHubJob { get; }

Property Value

StringExpr

GraphqlUrl

github.graphql_url: The URL of the GitHub GraphQL API.

public StringExpr GraphqlUrl { get; }

Property Value

StringExpr

HeadRef

github.head_ref: The head ref or source branch of the pull request (pull request events only).

public StringExpr HeadRef { get; }

Property Value

StringExpr

Inputs

inputs: The inputs of a reusable or manually triggered workflow. Index by input name.

public JsonExpr Inputs { get; }

Property Value

JsonExpr

Job

job: Information about the currently running job.

public GitHubContextsJobContext Job { get; }

Property Value

GitHubContextsJobContext

Jobs

jobs: Results and outputs of jobs in a reusable workflow. Index by job id.

public JsonExpr Jobs { get; }

Property Value

JsonExpr

Matrix

matrix: The matrix properties for the current job. Index by dimension name.

public JsonExpr Matrix { get; }

Property Value

JsonExpr

Needs

needs: Outputs and results of the jobs the current job depends on. Index by job id.

public JsonExpr Needs { get; }

Property Value

JsonExpr

Path

github.path: Path on the runner to the file that sets system PATH variables from workflow commands.

public StringExpr Path { get; }

Property Value

StringExpr

Ref

github.ref: The fully-formed ref of the branch or tag that triggered the workflow run.

public StringExpr Ref { get; }

Property Value

StringExpr

RefName

github.ref_name: The short ref name of the branch or tag that triggered the workflow run.

public StringExpr RefName { get; }

Property Value

StringExpr

RefProtected

github.ref_protected: Whether branch protections or rulesets are configured for the ref that triggered the run.

public BoolExpr RefProtected { get; }

Property Value

BoolExpr

RefType

github.ref_type: The type of ref that triggered the workflow run: branch or tag.

public StringExpr RefType { get; }

Property Value

StringExpr

Repository

github.repository: The owner and repository name, e.g. octocat/Hello-World.

public StringExpr Repository { get; }

Property Value

StringExpr

RepositoryId

github.repository_id: The id of the repository.

public StringExpr RepositoryId { get; }

Property Value

StringExpr

RepositoryOwner

github.repository_owner: The repository owner's username.

public StringExpr RepositoryOwner { get; }

Property Value

StringExpr

RepositoryOwnerId

github.repository_owner_id: The repository owner's account id.

public StringExpr RepositoryOwnerId { get; }

Property Value

StringExpr

RepositoryUrl

github.repositoryUrl: The Git URL to the repository.

public StringExpr RepositoryUrl { get; }

Property Value

StringExpr

RetentionDays

github.retention_days: The number of days that workflow run logs and artifacts are kept.

public StringExpr RetentionDays { get; }

Property Value

StringExpr

RunAttempt

github.run_attempt: A unique number for each attempt of a particular workflow run.

public StringExpr RunAttempt { get; }

Property Value

StringExpr

RunId

github.run_id: A unique number for each workflow run within a repository.

public StringExpr RunId { get; }

Property Value

StringExpr

RunNumber

github.run_number: A unique number for each run of a particular workflow in a repository.

public StringExpr RunNumber { get; }

Property Value

StringExpr

Runner

runner: Information about the runner executing the current job.

public GitHubContextsRunnerContext Runner { get; }

Property Value

GitHubContextsRunnerContext

SecretSource

github.secret_source: The source of a secret used in a workflow: None, Actions, Codespaces or Dependabot.

public StringExpr SecretSource { get; }

Property Value

StringExpr

Secrets

secrets: The secrets available to the run. Index by name.

public GitHubContextsSecretsContext Secrets { get; }

Property Value

GitHubContextsSecretsContext

ServerUrl

github.server_url: The URL of the GitHub server.

public StringExpr ServerUrl { get; }

Property Value

StringExpr

Sha

github.sha: The commit SHA that triggered the workflow.

public StringExpr Sha { get; }

Property Value

StringExpr

Steps

steps: Information about the steps that have run in the current job. Index by step id.

public JsonExpr Steps { get; }

Property Value

JsonExpr

Strategy

strategy: Information about the matrix execution strategy for the current job.

public GitHubContextsStrategyContext Strategy { get; }

Property Value

GitHubContextsStrategyContext

Token

github.token: A token to authenticate on behalf of the GitHub App installed on the repository.

public StringExpr Token { get; }

Property Value

StringExpr

TriggeringActor

github.triggering_actor: The username of the user that initiated the workflow run.

public StringExpr TriggeringActor { get; }

Property Value

StringExpr

Vars

vars: Configuration variables set at the organization, repository or environment level. Index by name.

public JsonExpr Vars { get; }

Property Value

JsonExpr

Workflow

github.workflow: The name of the workflow.

public StringExpr Workflow { get; }

Property Value

StringExpr

WorkflowRef

github.workflow_ref: The ref path to the workflow.

public StringExpr WorkflowRef { get; }

Property Value

StringExpr

WorkflowSha

github.workflow_sha: The commit SHA for the workflow file.

public StringExpr WorkflowSha { get; }

Property Value

StringExpr

Workspace

github.workspace: The default working directory on the runner for steps.

public StringExpr Workspace { get; }

Property Value

StringExpr