mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
Compare commits
1 Commits
v2.285.1
...
users/tihu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5057893a13 |
@@ -1,16 +1,19 @@
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- n/a
|
- Expose GITHUB_REF_* as environment variable (#1314)
|
||||||
|
- Add arch to runner context (#1372)
|
||||||
|
- Support Conditional Steps in Composite Actions (#1438)
|
||||||
|
- Log current runner version in terminal (#1441)
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
|
|
||||||
- Revert node12 version due to fs.copyFileSync hang #1537
|
- Makes the user keychains available to the service (#847)
|
||||||
|
- Use Actions Service health and api.github.com endpoints after connection failure on Actions Server and Hosted (#1385)
|
||||||
|
- Fix an issue where nested local composite actions did not correctly register post steps (#1433)
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
|
|
||||||
- n/a
|
- Cleanup Older versions on MacOS now that we recreate node versions as needed (#1410)
|
||||||
|
|
||||||
|
|
||||||
## Windows x64
|
## Windows x64
|
||||||
We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\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 in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.285.1
|
<Update to ./src/runnerversion when creating release>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ PACKAGERUNTIME=$1
|
|||||||
PRECACHE=$2
|
PRECACHE=$2
|
||||||
|
|
||||||
NODE_URL=https://nodejs.org/dist
|
NODE_URL=https://nodejs.org/dist
|
||||||
NODE12_VERSION="12.13.1"
|
NODE12_VERSION="12.22.7"
|
||||||
NODE16_VERSION="16.13.0"
|
NODE16_VERSION="16.13.0"
|
||||||
|
|
||||||
get_abs_path() {
|
get_abs_path() {
|
||||||
@@ -143,7 +143,7 @@ fi
|
|||||||
# Download the external tools for Linux PACKAGERUNTIMEs.
|
# Download the external tools for Linux PACKAGERUNTIMEs.
|
||||||
if [[ "$PACKAGERUNTIME" == "linux-x64" ]]; then
|
if [[ "$PACKAGERUNTIME" == "linux-x64" ]]; then
|
||||||
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-x64.tar.gz" node12 fix_nested_dir
|
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-x64.tar.gz" node12 fix_nested_dir
|
||||||
acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/${NODE12_VERSION}/alpine/x64/node-${NODE12_VERSION}-alpine-x64.tar.gz" node12_alpine
|
acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/${NODE12_VERSION}/alpine/x64/node-v${NODE12_VERSION}-alpine-x64.tar.gz" node12_alpine
|
||||||
acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-x64.tar.gz" node16 fix_nested_dir
|
acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-x64.tar.gz" node16 fix_nested_dir
|
||||||
acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/${NODE16_VERSION}/alpine/x64/node-v${NODE16_VERSION}-alpine-x64.tar.gz" node16_alpine
|
acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/${NODE16_VERSION}/alpine/x64/node-v${NODE16_VERSION}-alpine-x64.tar.gz" node16_alpine
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using System.Linq;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.Loader;
|
using System.Runtime.Loader;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -25,8 +26,8 @@ namespace GitHub.Runner.Common
|
|||||||
ISecretMasker SecretMasker { get; }
|
ISecretMasker SecretMasker { get; }
|
||||||
List<ProductInfoHeaderValue> UserAgents { get; }
|
List<ProductInfoHeaderValue> UserAgents { get; }
|
||||||
RunnerWebProxy WebProxy { get; }
|
RunnerWebProxy WebProxy { get; }
|
||||||
string GetDirectory(WellKnownDirectory directory);
|
string GetDirectory(WellKnownDirectory directory, string rootCaller = "", [CallerMemberName] string caller = "");
|
||||||
string GetConfigFile(WellKnownConfigFile configFile);
|
string GetConfigFile(WellKnownConfigFile configFile, string rootCaller = "", [CallerMemberName] string caller = "");
|
||||||
Tracing GetTrace(string name);
|
Tracing GetTrace(string name);
|
||||||
Task Delay(TimeSpan delay, CancellationToken cancellationToken);
|
Task Delay(TimeSpan delay, CancellationToken cancellationToken);
|
||||||
T CreateService<T>() where T : class, IRunnerService;
|
T CreateService<T>() where T : class, IRunnerService;
|
||||||
@@ -213,8 +214,13 @@ namespace GitHub.Runner.Common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetDirectory(WellKnownDirectory directory)
|
public string GetDirectory(WellKnownDirectory directory, string rootCaller = "", [CallerMemberName] string caller = "")
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(rootCaller))
|
||||||
|
{
|
||||||
|
rootCaller = caller;
|
||||||
|
}
|
||||||
|
|
||||||
string path;
|
string path;
|
||||||
switch (directory)
|
switch (directory)
|
||||||
{
|
{
|
||||||
@@ -224,29 +230,29 @@ namespace GitHub.Runner.Common
|
|||||||
|
|
||||||
case WellKnownDirectory.Diag:
|
case WellKnownDirectory.Diag:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
Constants.Path.DiagDirectory);
|
Constants.Path.DiagDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Externals:
|
case WellKnownDirectory.Externals:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
Constants.Path.ExternalsDirectory);
|
Constants.Path.ExternalsDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Root:
|
case WellKnownDirectory.Root:
|
||||||
path = new DirectoryInfo(GetDirectory(WellKnownDirectory.Bin)).Parent.FullName;
|
path = new DirectoryInfo(GetDirectory(WellKnownDirectory.Bin, rootCaller)).Parent.FullName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Temp:
|
case WellKnownDirectory.Temp:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Work),
|
GetDirectory(WellKnownDirectory.Work, rootCaller),
|
||||||
Constants.Path.TempDirectory);
|
Constants.Path.TempDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Actions:
|
case WellKnownDirectory.Actions:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Work),
|
GetDirectory(WellKnownDirectory.Work, rootCaller),
|
||||||
Constants.Path.ActionsDirectory);
|
Constants.Path.ActionsDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -257,14 +263,14 @@ namespace GitHub.Runner.Common
|
|||||||
if (string.IsNullOrEmpty(path))
|
if (string.IsNullOrEmpty(path))
|
||||||
{
|
{
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Work),
|
GetDirectory(WellKnownDirectory.Work, rootCaller),
|
||||||
Constants.Path.ToolDirectory);
|
Constants.Path.ToolDirectory);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Update:
|
case WellKnownDirectory.Update:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Work),
|
GetDirectory(WellKnownDirectory.Work, rootCaller),
|
||||||
Constants.Path.UpdateDirectory);
|
Constants.Path.UpdateDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -274,94 +280,99 @@ namespace GitHub.Runner.Common
|
|||||||
ArgUtil.NotNull(settings, nameof(settings));
|
ArgUtil.NotNull(settings, nameof(settings));
|
||||||
ArgUtil.NotNullOrEmpty(settings.WorkFolder, nameof(settings.WorkFolder));
|
ArgUtil.NotNullOrEmpty(settings.WorkFolder, nameof(settings.WorkFolder));
|
||||||
path = Path.GetFullPath(Path.Combine(
|
path = Path.GetFullPath(Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
settings.WorkFolder));
|
settings.WorkFolder));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new NotSupportedException($"Unexpected well known directory: '{directory}'");
|
throw new NotSupportedException($"Unexpected well known directory: '{directory}' ({rootCaller})");
|
||||||
}
|
}
|
||||||
|
|
||||||
_trace.Info($"Well known directory '{directory}': '{path}'");
|
_trace.Info($"Well known directory '{directory}': '{path}' ({rootCaller})");
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetConfigFile(WellKnownConfigFile configFile)
|
public string GetConfigFile(WellKnownConfigFile configFile, string rootCaller = "", [CallerMemberName] string caller = "")
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(rootCaller))
|
||||||
|
{
|
||||||
|
rootCaller = caller;
|
||||||
|
}
|
||||||
|
|
||||||
string path;
|
string path;
|
||||||
switch (configFile)
|
switch (configFile)
|
||||||
{
|
{
|
||||||
case WellKnownConfigFile.Runner:
|
case WellKnownConfigFile.Runner:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".runner");
|
".runner");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Credentials:
|
case WellKnownConfigFile.Credentials:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credentials");
|
".credentials");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.MigratedCredentials:
|
case WellKnownConfigFile.MigratedCredentials:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credentials_migrated");
|
".credentials_migrated");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.RSACredentials:
|
case WellKnownConfigFile.RSACredentials:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credentials_rsaparams");
|
".credentials_rsaparams");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Service:
|
case WellKnownConfigFile.Service:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".service");
|
".service");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.CredentialStore:
|
case WellKnownConfigFile.CredentialStore:
|
||||||
#if OS_OSX
|
#if OS_OSX
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credential_store.keychain");
|
".credential_store.keychain");
|
||||||
#else
|
#else
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credential_store");
|
".credential_store");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Certificates:
|
case WellKnownConfigFile.Certificates:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".certificates");
|
".certificates");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Options:
|
case WellKnownConfigFile.Options:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".options");
|
".options");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.SetupInfo:
|
case WellKnownConfigFile.SetupInfo:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".setup_info");
|
".setup_info");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Telemetry:
|
case WellKnownConfigFile.Telemetry:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Diag),
|
GetDirectory(WellKnownDirectory.Diag, rootCaller),
|
||||||
".telemetry");
|
".telemetry");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new NotSupportedException($"Unexpected well known config file: '{configFile}'");
|
throw new NotSupportedException($"Unexpected well known config file: '{configFile}' ({rootCaller})");
|
||||||
}
|
}
|
||||||
|
|
||||||
_trace.Info($"Well known config file '{configFile}': '{path}'");
|
_trace.Info($"Well known config file '{configFile}': '{path}' ({rootCaller})");
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -159,8 +159,13 @@ namespace GitHub.Runner.Common.Tests
|
|||||||
_serviceSingletons[typeof(T)] = singleton;
|
_serviceSingletons[typeof(T)] = singleton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetDirectory(WellKnownDirectory directory)
|
public string GetDirectory(WellKnownDirectory directory, string rootCaller = "", [CallerMemberName] string caller = "")
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(rootCaller))
|
||||||
|
{
|
||||||
|
rootCaller = caller;
|
||||||
|
}
|
||||||
|
|
||||||
string path;
|
string path;
|
||||||
switch (directory)
|
switch (directory)
|
||||||
{
|
{
|
||||||
@@ -170,13 +175,13 @@ namespace GitHub.Runner.Common.Tests
|
|||||||
|
|
||||||
case WellKnownDirectory.Diag:
|
case WellKnownDirectory.Diag:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
Constants.Path.DiagDirectory);
|
Constants.Path.DiagDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Externals:
|
case WellKnownDirectory.Externals:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
Constants.Path.ExternalsDirectory);
|
Constants.Path.ExternalsDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -186,13 +191,13 @@ namespace GitHub.Runner.Common.Tests
|
|||||||
|
|
||||||
case WellKnownDirectory.Temp:
|
case WellKnownDirectory.Temp:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Work),
|
GetDirectory(WellKnownDirectory.Work, rootCaller),
|
||||||
Constants.Path.TempDirectory);
|
Constants.Path.TempDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Actions:
|
case WellKnownDirectory.Actions:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Work),
|
GetDirectory(WellKnownDirectory.Work, rootCaller),
|
||||||
Constants.Path.ActionsDirectory);
|
Constants.Path.ActionsDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -202,14 +207,14 @@ namespace GitHub.Runner.Common.Tests
|
|||||||
if (string.IsNullOrEmpty(path))
|
if (string.IsNullOrEmpty(path))
|
||||||
{
|
{
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Work),
|
GetDirectory(WellKnownDirectory.Work, rootCaller),
|
||||||
Constants.Path.ToolDirectory);
|
Constants.Path.ToolDirectory);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Update:
|
case WellKnownDirectory.Update:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Work),
|
GetDirectory(WellKnownDirectory.Work, rootCaller),
|
||||||
Constants.Path.UpdateDirectory);
|
Constants.Path.UpdateDirectory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -223,66 +228,71 @@ namespace GitHub.Runner.Common.Tests
|
|||||||
throw new NotSupportedException($"Unexpected well known directory: '{directory}'");
|
throw new NotSupportedException($"Unexpected well known directory: '{directory}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
_trace.Info($"Well known directory '{directory}': '{path}'");
|
_trace.Info($"Well known directory '{directory}': '{path}' ({rootCaller})");
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetConfigFile(WellKnownConfigFile configFile)
|
public string GetConfigFile(WellKnownConfigFile configFile, string rootCaller = "", [CallerMemberName] string caller = "")
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(rootCaller))
|
||||||
|
{
|
||||||
|
rootCaller = caller;
|
||||||
|
}
|
||||||
|
|
||||||
string path;
|
string path;
|
||||||
switch (configFile)
|
switch (configFile)
|
||||||
{
|
{
|
||||||
case WellKnownConfigFile.Runner:
|
case WellKnownConfigFile.Runner:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".agent");
|
".agent");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Credentials:
|
case WellKnownConfigFile.Credentials:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credentials");
|
".credentials");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.RSACredentials:
|
case WellKnownConfigFile.RSACredentials:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credentials_rsaparams");
|
".credentials_rsaparams");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Service:
|
case WellKnownConfigFile.Service:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".service");
|
".service");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.CredentialStore:
|
case WellKnownConfigFile.CredentialStore:
|
||||||
#if OS_OSX
|
#if OS_OSX
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credential_store.keychain");
|
".credential_store.keychain");
|
||||||
#else
|
#else
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".credential_store");
|
".credential_store");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Certificates:
|
case WellKnownConfigFile.Certificates:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".certificates");
|
".certificates");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.Options:
|
case WellKnownConfigFile.Options:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".options");
|
".options");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownConfigFile.SetupInfo:
|
case WellKnownConfigFile.SetupInfo:
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
GetDirectory(WellKnownDirectory.Root),
|
GetDirectory(WellKnownDirectory.Root, rootCaller),
|
||||||
".setup_info");
|
".setup_info");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -290,7 +300,7 @@ namespace GitHub.Runner.Common.Tests
|
|||||||
throw new NotSupportedException($"Unexpected well known config file: '{configFile}'");
|
throw new NotSupportedException($"Unexpected well known config file: '{configFile}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
_trace.Info($"Well known config file '{configFile}': '{path}'");
|
_trace.Info($"Well known config file '{configFile}': '{path}' ({rootCaller})");
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
await _actionRunner.RunAsync();
|
await _actionRunner.RunAsync();
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
_ec.Verify(x => x.SetGitHubContext("event_path", Path.Combine(_hc.GetDirectory(WellKnownDirectory.Temp), "_github_workflow", "event.json")), Times.Once);
|
_ec.Verify(x => x.SetGitHubContext("event_path", Path.Combine(_hc.GetDirectory(WellKnownDirectory.Temp, "", ""), "_github_workflow", "event.json")), Times.Once);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
// Assert.
|
// Assert.
|
||||||
_trackingManager.Verify(x => x.LoadIfExists(_ec.Object, _trackingFile));
|
_trackingManager.Verify(x => x.LoadIfExists(_ec.Object, _trackingFile));
|
||||||
_trackingManager.Verify(x => x.Update(_ec.Object, _existingConfig, _trackingFile));
|
_trackingManager.Verify(x => x.Update(_ec.Object, _existingConfig, _trackingFile));
|
||||||
_ec.Verify(x => x.SetGitHubContext("workspace", Path.Combine(hc.GetDirectory(WellKnownDirectory.Work), _existingConfig.PipelineDirectory, "my_new_path")));
|
_ec.Verify(x => x.SetGitHubContext("workspace", Path.Combine(hc.GetDirectory(WellKnownDirectory.Work, "", ""), _existingConfig.PipelineDirectory, "my_new_path")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
_trackingManager.Setup(x => x.LoadIfExists(_ec.Object, _trackingFile)).Returns(_existingConfig);
|
_trackingManager.Setup(x => x.LoadIfExists(_ec.Object, _trackingFile)).Returns(_existingConfig);
|
||||||
|
|
||||||
// Act.
|
// Act.
|
||||||
Assert.ThrowsAny<ArgumentException>(()=> _pipelineDirectoryManager.UpdateRepositoryDirectory(_ec.Object, "actions/notrunner", Path.Combine(hc.GetDirectory(WellKnownDirectory.Work), "not_under_pipeline_directory"), false));
|
Assert.ThrowsAny<ArgumentException>(() => _pipelineDirectoryManager.UpdateRepositoryDirectory(_ec.Object, "actions/notrunner", Path.Combine(hc.GetDirectory(WellKnownDirectory.Work), "not_under_pipeline_directory"), false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.285.1
|
2.284.0
|
||||||
|
|||||||
Reference in New Issue
Block a user