GitHubActionsWorkflowInfo.

HeadRef Property

Summary

Gets the branch of the head repository.

Syntax

public string HeadRef { get; }

Examples

if (BuildSystem.GitHubActions.IsRunningOnGitHubActions)
{
    Information(@"Workflow HeadRef: {0}", BuildSystem.GitHubActions.Environment.Workflow.HeadRef);
}
if (GitHubActions.IsRunningOnGitHubActions)
{
    Information(@"Workflow HeadRef: {0}", GitHubActions.Environment.Workflow.HeadRef);
}

Value

Type Description
string The branch of the head repository. Only set for forked repositories.