mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Compare commits
3 Commits
v2.288.1
...
releases/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8caf59bb7 | ||
|
|
77c5a664ed | ||
|
|
b6aa01fabc |
@@ -1,11 +1,18 @@
|
||||
## Features
|
||||
|
||||
- Allow setting default severity to "notice" (#1213)
|
||||
- Show More Step Information in composite Actions (#1279)
|
||||
|
||||
## Bugs
|
||||
|
||||
- Temporary fix for macOS runner upgrade crash loop. (#1304)
|
||||
- Fixed an issue where GHES runners fail to download public docker images (#1199)
|
||||
|
||||
## Misc
|
||||
|
||||
- Update error to say 'uninstall' not 'unconfigure' (#1179)
|
||||
- Typo fixed (#1289)
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
<Update to ./src/runnerversion when creating release>
|
||||
2.281.1
|
||||
|
||||
@@ -118,6 +118,43 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# fix upgrade issue with macOS
|
||||
currentplatform=$(uname | awk '{print tolower($0)}')
|
||||
if [[ "$currentplatform" == 'darwin' ]]; then
|
||||
# need a short-term fix for https://github.com/actions/runner/issues/743
|
||||
# we will recreate all the ./externals/node12/bin/node of the past 5 versions
|
||||
# v2.280.3 v2.280.2 v2.280.1 v2.279.0 v2.278.0
|
||||
if [[ ! -e "$rootfolder/externals.2.280.3/node12/bin/node" ]]
|
||||
then
|
||||
mkdir -p "$rootfolder/externals.2.280.3/node12/bin"
|
||||
cp "$rootfolder/externals/node12/bin/node" "$rootfolder/externals.2.280.3/node12/bin/node"
|
||||
fi
|
||||
|
||||
if [[ ! -e "$rootfolder/externals.2.280.2/node12/bin/node" ]]
|
||||
then
|
||||
mkdir -p "$rootfolder/externals.2.280.2/node12/bin"
|
||||
cp "$rootfolder/externals/node12/bin/node" "$rootfolder/externals.2.280.2/node12/bin/node"
|
||||
fi
|
||||
|
||||
if [[ ! -e "$rootfolder/externals.2.280.1/node12/bin/node" ]]
|
||||
then
|
||||
mkdir -p "$rootfolder/externals.2.280.1/node12/bin"
|
||||
cp "$rootfolder/externals/node12/bin/node" "$rootfolder/externals.2.280.1/node12/bin/node"
|
||||
fi
|
||||
|
||||
if [[ ! -e "$rootfolder/externals.2.279.0/node12/bin/node" ]]
|
||||
then
|
||||
mkdir -p "$rootfolder/externals.2.279.0/node12/bin"
|
||||
cp "$rootfolder/externals/node12/bin/node" "$rootfolder/externals.2.279.0/node12/bin/node"
|
||||
fi
|
||||
|
||||
if [[ ! -e "$rootfolder/externals.2.278.0/node12/bin/node" ]]
|
||||
then
|
||||
mkdir -p "$rootfolder/externals.2.278.0/node12/bin"
|
||||
cp "$rootfolder/externals/node12/bin/node" "$rootfolder/externals.2.278.0/node12/bin/node"
|
||||
fi
|
||||
fi
|
||||
|
||||
date "+[%F %T-%4N] Update succeed" >> "$logfile"
|
||||
|
||||
# rename the update log file with %logfile%.succeed/.failed/succeedneedrestart
|
||||
|
||||
@@ -347,12 +347,9 @@ namespace GitHub.Runner.Listener.Configuration
|
||||
|
||||
_term.WriteLine();
|
||||
_term.WriteSuccessMessage("Runner service removed");
|
||||
#elif OS_LINUX
|
||||
// unconfig system D service first
|
||||
throw new Exception("Unconfigure service first");
|
||||
#elif OS_OSX
|
||||
// unconfig osx service first
|
||||
throw new Exception("Unconfigure service first");
|
||||
#else
|
||||
// unconfig systemd or osx service first
|
||||
throw new Exception("Uninstall service first");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -74,10 +74,12 @@ namespace GitHub.Runner.Listener
|
||||
await jobDispatcher.WaitAsync(token);
|
||||
Trace.Info($"All running job has exited.");
|
||||
|
||||
// We need to keep runner backup around for macOS until we fixed https://github.com/actions/runner/issues/743
|
||||
#if !OS_OSX
|
||||
// delete runner backup
|
||||
DeletePreviousVersionRunnerBackup(token);
|
||||
Trace.Info($"Delete old version runner backup.");
|
||||
|
||||
#endif
|
||||
// generate update script from template
|
||||
await UpdateRunnerUpdateStateAsync("Generate and execute update script.");
|
||||
|
||||
@@ -96,7 +98,7 @@ namespace GitHub.Runner.Listener
|
||||
invokeScript.Start();
|
||||
Trace.Info($"Update script start running");
|
||||
|
||||
await UpdateRunnerUpdateStateAsync("Runner will exit shortly for update, should back online within 10 seconds.");
|
||||
await UpdateRunnerUpdateStateAsync("Runner will exit shortly for update, should be back online within 10 seconds.");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -980,18 +980,6 @@ namespace GitHub.Runner.Worker
|
||||
context.Write(null, message);
|
||||
}
|
||||
|
||||
public static void WriteDetails(this IExecutionContext context, string message)
|
||||
{
|
||||
if (context.IsEmbedded)
|
||||
{
|
||||
context.Debug(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Output(message);
|
||||
}
|
||||
}
|
||||
|
||||
// Do not add a format string overload. See comment on ExecutionContext.Write().
|
||||
public static void Command(this IExecutionContext context, string message)
|
||||
{
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
var dockerFile = Path.Combine(ActionDirectory, Data.Image);
|
||||
ArgUtil.File(dockerFile, nameof(Data.Image));
|
||||
|
||||
ExecutionContext.WriteDetails(ExecutionContext.IsEmbedded ? "Building docker image" : $"##[group]Building docker image");
|
||||
ExecutionContext.WriteDetails($"Dockerfile for action: '{dockerFile}'.");
|
||||
ExecutionContext.Output($"##[group]Building docker image");
|
||||
ExecutionContext.Output($"Dockerfile for action: '{dockerFile}'.");
|
||||
var imageName = $"{dockerManager.DockerInstanceLabel}:{ExecutionContext.Id.ToString("N")}";
|
||||
var buildExitCode = await dockerManager.DockerBuild(
|
||||
ExecutionContext,
|
||||
@@ -59,7 +59,7 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
dockerFile,
|
||||
Directory.GetParent(dockerFile).FullName,
|
||||
imageName);
|
||||
ExecutionContext.WriteDetails(ExecutionContext.IsEmbedded ? "" : "##[endgroup]");
|
||||
ExecutionContext.Output("##[endgroup]");
|
||||
|
||||
if (buildExitCode != 0)
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
|
||||
if (stage == ActionRunStage.Post)
|
||||
{
|
||||
ExecutionContext.WriteDetails($"Post job cleanup.");
|
||||
ExecutionContext.Output($"Post job cleanup.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,30 +118,30 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
groupName = "Action details";
|
||||
}
|
||||
|
||||
ExecutionContext.WriteDetails(ExecutionContext.IsEmbedded ? groupName : $"##[group]{groupName}");
|
||||
ExecutionContext.Output($"##[group]{groupName}");
|
||||
|
||||
if (this.Inputs?.Count > 0)
|
||||
{
|
||||
ExecutionContext.WriteDetails("with:");
|
||||
ExecutionContext.Output("with:");
|
||||
foreach (var input in this.Inputs)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(input.Value))
|
||||
{
|
||||
ExecutionContext.WriteDetails($" {input.Key}: {input.Value}");
|
||||
ExecutionContext.Output($" {input.Key}: {input.Value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.Environment?.Count > 0)
|
||||
{
|
||||
ExecutionContext.WriteDetails("env:");
|
||||
ExecutionContext.Output("env:");
|
||||
foreach (var env in this.Environment)
|
||||
{
|
||||
ExecutionContext.WriteDetails($" {env.Key}: {env.Value}");
|
||||
ExecutionContext.Output($" {env.Key}: {env.Value}");
|
||||
}
|
||||
}
|
||||
|
||||
ExecutionContext.WriteDetails(ExecutionContext.IsEmbedded ? "" : "##[endgroup]");
|
||||
ExecutionContext.Output("##[endgroup]");
|
||||
}
|
||||
|
||||
public override void Initialize(IHostContext hostContext)
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
firstLine = firstLine.Substring(0, firstNewLine);
|
||||
}
|
||||
|
||||
ExecutionContext.WriteDetails(ExecutionContext.IsEmbedded ? $"Run {firstLine}" : $"##[group]Run {firstLine}");
|
||||
ExecutionContext.Output($"##[group]Run {firstLine}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -51,7 +51,7 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
foreach (var line in multiLines)
|
||||
{
|
||||
// Bright Cyan color
|
||||
ExecutionContext.WriteDetails($"\x1b[36;1m{line}\x1b[0m");
|
||||
ExecutionContext.Output($"\x1b[36;1m{line}\x1b[0m");
|
||||
}
|
||||
|
||||
string argFormat;
|
||||
@@ -110,23 +110,23 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
|
||||
if (!string.IsNullOrEmpty(shellCommandPath))
|
||||
{
|
||||
ExecutionContext.WriteDetails($"shell: {shellCommandPath} {argFormat}");
|
||||
ExecutionContext.Output($"shell: {shellCommandPath} {argFormat}");
|
||||
}
|
||||
else
|
||||
{
|
||||
ExecutionContext.WriteDetails($"shell: {shellCommand} {argFormat}");
|
||||
ExecutionContext.Output($"shell: {shellCommand} {argFormat}");
|
||||
}
|
||||
|
||||
if (this.Environment?.Count > 0)
|
||||
{
|
||||
ExecutionContext.WriteDetails("env:");
|
||||
ExecutionContext.Output("env:");
|
||||
foreach (var env in this.Environment)
|
||||
{
|
||||
ExecutionContext.WriteDetails($" {env.Key}: {env.Value}");
|
||||
ExecutionContext.Output($" {env.Key}: {env.Value}");
|
||||
}
|
||||
}
|
||||
|
||||
ExecutionContext.WriteDetails(ExecutionContext.IsEmbedded ? "" : "##[endgroup]");
|
||||
ExecutionContext.Output("##[endgroup]");
|
||||
}
|
||||
|
||||
public async Task RunAsync(ActionRunStage stage)
|
||||
|
||||
@@ -350,6 +350,7 @@ namespace GitHub.Runner.Worker
|
||||
case "":
|
||||
case "ERROR":
|
||||
case "WARNING":
|
||||
case "NOTICE":
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException($"Matcher '{_owner}' contains unexpected default severity '{_severity}'");
|
||||
|
||||
@@ -392,6 +392,35 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
Assert.Equal("not-working", match.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Worker")]
|
||||
public void Matcher_MultiplePatterns_DefaultSeverityNotice()
|
||||
{
|
||||
var config = JsonUtility.FromString<IssueMatchersConfig>(@"
|
||||
{
|
||||
""problemMatcher"": [
|
||||
{
|
||||
""owner"": ""myMatcher"",
|
||||
""severity"": ""notice"",
|
||||
""pattern"": [
|
||||
{
|
||||
""regexp"": ""^(.+)$"",
|
||||
""message"": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
");
|
||||
config.Validate();
|
||||
var matcher = new IssueMatcher(config.Matchers[0], TimeSpan.FromSeconds(1));
|
||||
|
||||
var match = matcher.Match("just-a-notice");
|
||||
Assert.Equal("notice", match.Severity);
|
||||
Assert.Equal("just-a-notice", match.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Worker")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.281.0
|
||||
2.281.1
|
||||
|
||||
Reference in New Issue
Block a user