Summary
Gets the GitHub Actions environment.
- Namespace
- Cake
.Common .Build .GitHubActions - Containing Type
- I
Git Hub Actions Provider
Syntax
GitHubActionsEnvironmentInfo Environment { get; }
Examples
if (BuildSystem.GitHubActions.IsRunningOnGitHubActions)
{
Information(
@"Workflow:
Workflow: {0}
Repository: {1}
Actor: {2}
Runner OS: {3}
Runner Environment: {4}
Runner Architecture: {5}",
BuildSystem.GitHubActions.Environment.Workflow.Workflow,
BuildSystem.GitHubActions.Environment.Workflow.Repository,
BuildSystem.GitHubActions.Environment.Workflow.Actor,
BuildSystem.GitHubActions.Environment.Runner.OS,
BuildSystem.GitHubActions.Environment.Runner.Environment,
BuildSystem.GitHubActions.Environment.Runner.Architecture
);
}
else
{
Information("Not running on GitHub Actions");
}
if (GitHubActions.IsRunningOnGitHubActions)
{
Information(
@"Workflow:
Workflow: {0}
Repository: {1}
Actor: {2}
Runner OS: {3}
Runner Environment: {4}
Runner Architecture: {5}",
GitHubActions.Environment.Workflow.Workflow,
GitHubActions.Environment.Workflow.Repository,
GitHubActions.Environment.Workflow.Actor,
GitHubActions.Environment.Runner.OS,
GitHubActions.Environment.Runner.Environment,
GitHubActions.Environment.Runner.Architecture
);
}
else
{
Information("Not running on GitHub Actions");
}
Value
| Type | Description |
|---|---|
| Git |
The GitHub Actions environment. |
