GitHubActionsEnvironmentInfo.

Runner Property

Summary

Gets GitHub Actions runner information.

Syntax

public GitHubActionsRunnerInfo Runner { get; }

Examples

if (BuildSystem.GitHubActions.IsRunningOnGitHubActions)
{
    Information(
        @"Runner:
        OS: {0}
        Temp: {1}
        ToolCache: {2}
        Workspace: {3}",
        BuildSystem.GitHubActions.Environment.Runner.OS,
        BuildSystem.GitHubActions.Environment.Runner.Temp,
        BuildSystem.GitHubActions.Environment.Runner.ToolCache,
        BuildSystem.GitHubActions.Environment.Runner.Workspace
        );
}
else
{
    Information("Not running on GitHubActions");
}
if (GitHubActions.IsRunningOnGitHubActions)
{
    Information(
        @"Runner:
        OS: {0}
        Temp: {1}
        ToolCache: {2}
        Workspace: {3}",
        GitHubActions.Environment.Runner.OS,
        GitHubActions.Environment.Runner.Temp,
        GitHubActions.Environment.Runner.ToolCache,
        GitHubActions.Environment.Runner.Workspace
        );
}
else
{
    Information("Not running on GitHubActions");
}

Value

Type Description
GitHubActionsRunnerInfo The GitHub Actions runner information.