mirror of
https://github.com/actions/runner.git
synced 2025-12-14 13:43:33 +00:00
Compare commits
2 Commits
users/juli
...
v2.163.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bbbca9e5d | ||
|
|
2cac011558 |
@@ -1,13 +1,14 @@
|
|||||||
## Features
|
## Features
|
||||||
- Added the "severity" keyword to allow action authors to set the default severity for problem matchers (#203)
|
- Added Proxy Support for self-hosted runner. (#206)
|
||||||
|
- Introduce `--name` configure argument for runner name. (#217)
|
||||||
|
- Better repo matching for issue file path (checkout v2 related) (#208)
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- Fixed generated self-hosted runner names to never go over 80 characters (helps Windows customers) (#193)
|
- N/A
|
||||||
- Fixed `PrepareActions_DownloadActionFromGraph` test by pointing to an active Actions repository (#205)
|
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
- Updated the publish and download artifact actions to use the v2 endpoint (#188)
|
- Runner code cleanup (#197, #209, #214, #219)
|
||||||
- Updated the service name on self-hosted runner name to include repository or organization information (#193)
|
- Update node external to 12.13.1 (#215)
|
||||||
|
|
||||||
## Windows x64
|
## Windows x64
|
||||||
We recommend configuring the runner under "<DRIVE>:\actions-runner". This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows
|
We recommend configuring the runner under "<DRIVE>:\actions-runner". This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using GitHub.Runner.Sdk;
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -14,6 +15,9 @@ namespace GitHub.Runner.Listener
|
|||||||
{
|
{
|
||||||
public static int Main(string[] args)
|
public static int Main(string[] args)
|
||||||
{
|
{
|
||||||
|
// Add environment variables from .env file
|
||||||
|
LoadAndSetEnv();
|
||||||
|
|
||||||
using (HostContext context = new HostContext("Runner"))
|
using (HostContext context = new HostContext("Runner"))
|
||||||
{
|
{
|
||||||
return MainAsync(context, args).GetAwaiter().GetResult();
|
return MainAsync(context, args).GetAwaiter().GetResult();
|
||||||
@@ -25,7 +29,7 @@ namespace GitHub.Runner.Listener
|
|||||||
// 1: Terminate failure
|
// 1: Terminate failure
|
||||||
// 2: Retriable failure
|
// 2: Retriable failure
|
||||||
// 3: Exit for self update
|
// 3: Exit for self update
|
||||||
public async static Task<int> MainAsync(IHostContext context, string[] args)
|
private async static Task<int> MainAsync(IHostContext context, string[] args)
|
||||||
{
|
{
|
||||||
Tracing trace = context.GetTrace(nameof(GitHub.Runner.Listener));
|
Tracing trace = context.GetTrace(nameof(GitHub.Runner.Listener));
|
||||||
trace.Info($"Runner is built for {Constants.Runner.Platform} ({Constants.Runner.PlatformArchitecture}) - {BuildConstants.RunnerPackage.PackageName}.");
|
trace.Info($"Runner is built for {Constants.Runner.Platform} ({Constants.Runner.PlatformArchitecture}) - {BuildConstants.RunnerPackage.PackageName}.");
|
||||||
@@ -83,22 +87,6 @@ namespace GitHub.Runner.Listener
|
|||||||
return Constants.Runner.ReturnCode.TerminatedError;
|
return Constants.Runner.ReturnCode.TerminatedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add environment variables from .env file
|
|
||||||
string envFile = Path.Combine(context.GetDirectory(WellKnownDirectory.Root), ".env");
|
|
||||||
if (File.Exists(envFile))
|
|
||||||
{
|
|
||||||
var envContents = File.ReadAllLines(envFile);
|
|
||||||
foreach (var env in envContents)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(env) && env.IndexOf('=') > 0)
|
|
||||||
{
|
|
||||||
string envKey = env.Substring(0, env.IndexOf('='));
|
|
||||||
string envValue = env.Substring(env.IndexOf('=') + 1);
|
|
||||||
Environment.SetEnvironmentVariable(envKey, envValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse the command line args.
|
// Parse the command line args.
|
||||||
var command = new CommandSettings(context, args);
|
var command = new CommandSettings(context, args);
|
||||||
trace.Info("Arguments parsed");
|
trace.Info("Arguments parsed");
|
||||||
@@ -136,5 +124,34 @@ namespace GitHub.Runner.Listener
|
|||||||
return Constants.Runner.ReturnCode.RetryableError;
|
return Constants.Runner.ReturnCode.RetryableError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void LoadAndSetEnv()
|
||||||
|
{
|
||||||
|
var binDir = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||||
|
var rootDir = new DirectoryInfo(binDir).Parent.FullName;
|
||||||
|
string envFile = Path.Combine(rootDir, ".env");
|
||||||
|
if (File.Exists(envFile))
|
||||||
|
{
|
||||||
|
var envContents = File.ReadAllLines(envFile);
|
||||||
|
foreach (var env in envContents)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(env))
|
||||||
|
{
|
||||||
|
var separatorIndex = env.IndexOf('=');
|
||||||
|
if (separatorIndex > 0)
|
||||||
|
{
|
||||||
|
string envKey = env.Substring(0, separatorIndex);
|
||||||
|
string envValue = null;
|
||||||
|
if (env.Length > separatorIndex + 1)
|
||||||
|
{
|
||||||
|
envValue = env.Substring(separatorIndex + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Environment.SetEnvironmentVariable(envKey, envValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.162.0
|
2.163.0
|
||||||
|
|||||||
Reference in New Issue
Block a user