mirror of
https://github.com/actions/runner.git
synced 2025-12-10 20:36:49 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b158fff05 | ||
|
|
6225b22870 | ||
|
|
53da198867 | ||
|
|
3a43d853be | ||
|
|
9d7b0a2405 |
@@ -1,13 +1,11 @@
|
|||||||
## Features
|
## Features
|
||||||
- Added support for OS and Architecture Labels for self hosted runners (#130)
|
- Set Default shell to powershell for windows runners (#135)
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- N/A
|
- Removed unintended additional fields on error and warning commands (#137)
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
- Updated Prompts for self-hosted runners (#126)
|
- N/A
|
||||||
- Optimized Secret Masking of Base64 Encoded Secrets (#128)
|
|
||||||
- Added additional tests for secret masking (#129)
|
|
||||||
|
|
||||||
## Agent Downloads
|
## Agent Downloads
|
||||||
|
|
||||||
|
|||||||
@@ -441,9 +441,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public void ProcessCommand(IExecutionContext context, string inputLine, ActionCommand command, out bool omitEcho)
|
public void ProcessCommand(IExecutionContext context, string inputLine, ActionCommand command, out bool omitEcho)
|
||||||
{
|
{
|
||||||
omitEcho = true;
|
omitEcho = true;
|
||||||
command.Properties.TryGetValue(IssueCommandProperties.File, out string file);
|
|
||||||
command.Properties.TryGetValue(IssueCommandProperties.Line, out string line);
|
|
||||||
command.Properties.TryGetValue(IssueCommandProperties.Column, out string column);
|
|
||||||
|
|
||||||
Issue issue = new Issue()
|
Issue issue = new Issue()
|
||||||
{
|
{
|
||||||
@@ -452,54 +449,8 @@ namespace GitHub.Runner.Worker
|
|||||||
Message = command.Data
|
Message = command.Data
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(file))
|
|
||||||
{
|
|
||||||
issue.Category = "Code";
|
|
||||||
|
|
||||||
if (context.Container != null)
|
|
||||||
{
|
|
||||||
// Translate file path back from container path
|
|
||||||
file = context.Container.TranslateToHostPath(file);
|
|
||||||
command.Properties[IssueCommandProperties.File] = file;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the values that represent the server path given a local path
|
|
||||||
string repoName = context.GetGitHubContext("repository");
|
|
||||||
var repoPath = context.GetGitHubContext("workspace");
|
|
||||||
|
|
||||||
string relativeSourcePath = IOUtil.MakeRelative(file, repoPath);
|
|
||||||
if (!string.Equals(relativeSourcePath, file, IOUtil.FilePathStringComparison))
|
|
||||||
{
|
|
||||||
// add repo info
|
|
||||||
if (!string.IsNullOrEmpty(repoName))
|
|
||||||
{
|
|
||||||
command.Properties["repo"] = repoName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(relativeSourcePath))
|
|
||||||
{
|
|
||||||
// replace sourcePath with the new relative path
|
|
||||||
// prefer `/` on all platforms
|
|
||||||
command.Properties[IssueCommandProperties.File] = relativeSourcePath.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var property in command.Properties)
|
|
||||||
{
|
|
||||||
issue.Data[property.Key] = property.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
context.AddIssue(issue);
|
context.AddIssue(issue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class IssueCommandProperties
|
|
||||||
{
|
|
||||||
public const String File = "file";
|
|
||||||
public const String Line = "line";
|
|
||||||
public const String Column = "col";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class GroupCommandExtension : GroupingCommandExtension
|
public sealed class GroupCommandExtension : GroupingCommandExtension
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
if (string.IsNullOrEmpty(shell))
|
if (string.IsNullOrEmpty(shell))
|
||||||
{
|
{
|
||||||
#if OS_WINDOWS
|
#if OS_WINDOWS
|
||||||
shellCommand = "cmd";
|
shellCommand = "powershell";
|
||||||
if(validateShellOnHost)
|
if(validateShellOnHost)
|
||||||
{
|
{
|
||||||
shellCommandPath = System.Environment.GetEnvironmentVariable("ComSpec");
|
shellCommandPath = WhichUtil.Which(shellCommand, true, Trace);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
shellCommand = "sh";
|
shellCommand = "sh";
|
||||||
@@ -143,9 +143,9 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
if (string.IsNullOrEmpty(shell))
|
if (string.IsNullOrEmpty(shell))
|
||||||
{
|
{
|
||||||
#if OS_WINDOWS
|
#if OS_WINDOWS
|
||||||
shellCommand = "cmd";
|
shellCommand = "powershell";
|
||||||
commandPath = System.Environment.GetEnvironmentVariable("ComSpec");
|
commandPath = WhichUtil.Which(shellCommand, true, Trace);
|
||||||
ArgUtil.NotNullOrEmpty(commandPath, "%ComSpec%");
|
ArgUtil.NotNullOrEmpty(commandPath, "Default Shell");
|
||||||
#else
|
#else
|
||||||
shellCommand = "sh";
|
shellCommand = "sh";
|
||||||
commandPath = WhichUtil.Which("bash", false, Trace) ?? WhichUtil.Which("sh", true, Trace);
|
commandPath = WhichUtil.Which("bash", false, Trace) ?? WhichUtil.Which("sh", true, Trace);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.159.1
|
2.159.2
|
||||||
Reference in New Issue
Block a user