mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Compare commits
2 Commits
v2.273.0
...
cschleiden
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6141233980 | ||
|
|
5e670caa0b |
@@ -93,9 +93,11 @@ namespace GitHub.Runner.Listener.Configuration
|
|||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
// Get the URL
|
// Get the URL
|
||||||
|
var isGitHub = StringUtil.ConvertToBoolean(Environment.GetEnvironmentVariable("_IS_GITHUB"));
|
||||||
var inputUrl = command.GetUrl();
|
var inputUrl = command.GetUrl();
|
||||||
if (!inputUrl.Contains("github.com", StringComparison.OrdinalIgnoreCase) &&
|
if (!inputUrl.Contains("github.com", StringComparison.OrdinalIgnoreCase) &&
|
||||||
!inputUrl.Contains("github.localhost", StringComparison.OrdinalIgnoreCase))
|
!inputUrl.Contains("github.localhost", StringComparison.OrdinalIgnoreCase) &&
|
||||||
|
!isGitHub)
|
||||||
{
|
{
|
||||||
runnerSettings.ServerUrl = inputUrl;
|
runnerSettings.ServerUrl = inputUrl;
|
||||||
// Get the credentials
|
// Get the credentials
|
||||||
@@ -520,7 +522,7 @@ namespace GitHub.Runner.Listener.Configuration
|
|||||||
private async Task<GitHubAuthResult> GetTenantCredential(string githubUrl, string githubToken, string runnerEvent)
|
private async Task<GitHubAuthResult> GetTenantCredential(string githubUrl, string githubToken, string runnerEvent)
|
||||||
{
|
{
|
||||||
var gitHubUrlBuilder = new UriBuilder(githubUrl);
|
var gitHubUrlBuilder = new UriBuilder(githubUrl);
|
||||||
var githubApiUrl = $"{gitHubUrlBuilder.Scheme}://api.{gitHubUrlBuilder.Host}/actions/runner-registration";
|
var githubApiUrl = $"{gitHubUrlBuilder.Scheme}://{gitHubUrlBuilder.Host}/api/v3/actions/runner-registration";
|
||||||
using (var httpClientHandler = HostContext.CreateHttpClientHandler())
|
using (var httpClientHandler = HostContext.CreateHttpClientHandler())
|
||||||
using (var httpClient = new HttpClient(httpClientHandler))
|
using (var httpClient = new HttpClient(httpClientHandler))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user