Use BrokerURL when using RunnerAdmin (#4044)

This commit is contained in:
Luke Tomlinson
2025-09-18 10:10:23 -04:00
committed by GitHub
parent 170033c92b
commit b121ef832b

View File

@@ -334,6 +334,7 @@ namespace GitHub.Runner.Listener.Configuration
{ {
var runner = await _dotcomServer.AddRunnerAsync(runnerSettings.PoolId, agent, runnerSettings.GitHubUrl, registerToken, publicKeyXML); var runner = await _dotcomServer.AddRunnerAsync(runnerSettings.PoolId, agent, runnerSettings.GitHubUrl, registerToken, publicKeyXML);
runnerSettings.ServerUrlV2 = runner.RunnerAuthorization.ServerUrl; runnerSettings.ServerUrlV2 = runner.RunnerAuthorization.ServerUrl;
runnerSettings.UseV2Flow = true; // if we are using runner admin, we also need to hit broker
agent.Id = runner.Id; agent.Id = runner.Id;
agent.Authorization = new TaskAgentAuthorization() agent.Authorization = new TaskAgentAuthorization()