Summary
Gets GitHub Actions runner information.
- Namespace
- Cake
.Common .Build .GitHubActions .Data - Containing Type
- Git
Hub Actions Environment Info
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 |
---|---|
Git |
The GitHub Actions runner information. |