Summary
Gets the branch of the head repository.
- Namespace
- Cake
.Common .Build .GitHubActions .Data - Containing Type
- Git
Hub Actions Workflow Info
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. |
