diff --git a/src/Runner.Listener/Configuration/ConfigurationManager.cs b/src/Runner.Listener/Configuration/ConfigurationManager.cs index 1c12a7324..baddb458e 100644 --- a/src/Runner.Listener/Configuration/ConfigurationManager.cs +++ b/src/Runner.Listener/Configuration/ConfigurationManager.cs @@ -93,9 +93,11 @@ namespace GitHub.Runner.Listener.Configuration while (true) { // Get the URL + var isGitHub = StringUtil.ConvertToBoolean(Environment.GetEnvironmentVariable("_IS_GITHUB")); var inputUrl = command.GetUrl(); if (!inputUrl.Contains("github.com", StringComparison.OrdinalIgnoreCase) && - !inputUrl.Contains("github.localhost", StringComparison.OrdinalIgnoreCase)) + !inputUrl.Contains("github.localhost", StringComparison.OrdinalIgnoreCase) && + !isGitHub) { runnerSettings.ServerUrl = inputUrl; // Get the credentials