IGitHubActionsProvider.

IsRunningOnGitHubActions Property

Summary

Gets a value indicating whether the current build is running on GitHub Actions.

Syntax

bool IsRunningOnGitHubActions { get; }

Examples

if (BuildSystem.GitHubActions.IsRunningOnGitHubActions)
{
    Information("Running on GitHub Actions");
}
else
{
    Information("Not running on GitHub Actions");
}
if (GitHubActions.IsRunningOnGitHubActions)
{
    GitHubActions.Commands.Debug("Running on GitHub Actions");
}
else
{
    Information("Not running on GitHub Actions");
}

Value

Type Description
bool true if the current build is running on GitHub Actions; otherwise, false.