mirror of
https://github.com/actions/runner.git
synced 2025-12-11 04:46:58 +00:00
Use the API_URL and munge action URLs for GHES (#437)
* First pass at logic for GHES, not all correct * Need to mock out file downloading * Allowed for mocking of HTTP responses * Added test for builtin GHES action download * More tests * Don't retry on action 404 * Remove commented out code * Add a using statement back, because Windows * Make windows happy again * Another windows fix * Always delete the cache since it isn't fully implemented * Use RunnerService base class * Add examples, update URL path * Remove forceDotCom * Fix a bug * Remove a test that's no longer relevant * PR feedback * Add missing return * More trace info * Use the new agreed-upon format * Use the auth token since we're hitting GHES directly * Fixing tests on windows * Fixed one more test
This commit is contained in:
19
src/Runner.Common/HttpClientHandlerFactory.cs
Normal file
19
src/Runner.Common/HttpClientHandlerFactory.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Net.Http;
|
||||
using GitHub.Runner.Sdk;
|
||||
|
||||
namespace GitHub.Runner.Common
|
||||
{
|
||||
[ServiceLocator(Default = typeof(HttpClientHandlerFactory))]
|
||||
public interface IHttpClientHandlerFactory : IRunnerService
|
||||
{
|
||||
HttpClientHandler CreateClientHandler(RunnerWebProxy webProxy);
|
||||
}
|
||||
|
||||
public class HttpClientHandlerFactory : RunnerService, IHttpClientHandlerFactory
|
||||
{
|
||||
public HttpClientHandler CreateClientHandler(RunnerWebProxy webProxy)
|
||||
{
|
||||
return new HttpClientHandler() { Proxy = webProxy };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user