mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Allow runner to use authv2 during config. (#3866)
This commit is contained in:
@@ -70,7 +70,7 @@ namespace GitHub.Runner.Listener.Configuration
|
||||
public RunnerSettings LoadMigratedSettings()
|
||||
{
|
||||
Trace.Info(nameof(LoadMigratedSettings));
|
||||
|
||||
|
||||
// Check if migrated settings file exists
|
||||
if (!_store.IsMigratedConfigured())
|
||||
{
|
||||
@@ -387,6 +387,14 @@ namespace GitHub.Runner.Listener.Configuration
|
||||
},
|
||||
};
|
||||
|
||||
if (agent.Properties.GetValue("EnableAuthMigrationByDefault", false) &&
|
||||
agent.Properties.TryGetValue<string>("AuthorizationUrlV2", out var authUrlV2) &&
|
||||
!string.IsNullOrEmpty(authUrlV2))
|
||||
{
|
||||
credentialData.Data["enableAuthMigrationByDefault"] = "true";
|
||||
credentialData.Data["authorizationUrlV2"] = authUrlV2;
|
||||
}
|
||||
|
||||
// Save the negotiated OAuth credential data
|
||||
_store.SaveCredential(credentialData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user