mirror of
https://github.com/actions/runner.git
synced 2025-12-10 20:36:49 +00:00
Compare commits
6 Commits
users/tihu
...
v2.291.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dac4363206 | ||
|
|
7ba4f8587e | ||
|
|
88f7c56757 | ||
|
|
20b7e86e47 | ||
|
|
bd5f275830 | ||
|
|
a7aadf5615 |
@@ -1,18 +1,12 @@
|
|||||||
## Features
|
## Features
|
||||||
- Continue-on-error is now possible for the composite action steps (#1763)
|
- Relaxed naming requirements for dockerfiles (e.g. `Dockerfile.test` can now be built) (#1738)
|
||||||
- Now it's possible to use context evaluation in the `shell` of composite action run steps (#1767)
|
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- Fix a bug where job would be marked as 'cancelled' after self-hosted runner going offline (#1792)
|
- Fixed a bug where windows path separators were used in generated folders (#1617)
|
||||||
- Translate paths in `github` and `runner` contexts when running on a container (#1762)
|
- Fixed an issue where runner's invoked via `run.sh` or `run.cmd` did not properly restart after update (#1812). This fix applies to all future updates after installing this version
|
||||||
- Warn about invalid flags when configuring or running the runner (#1781)
|
|
||||||
- Fix a bug where job hooks would use job level working directory (#1809)
|
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
- Allow warnings about actions using Node v12 (#1735)
|
- Relaxed Actions Summary size limit to 1MiB (#1839)
|
||||||
- Better exception handling when runner is configured with invalid Url or token (#1741)
|
|
||||||
- Set user agent for websocket requests (#1791)
|
|
||||||
- Gracefully handle websocket failures (#1789)
|
|
||||||
|
|
||||||
## 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 @@
|
|||||||
<Update to ./src/runnerversion when creating release>
|
2.291.0
|
||||||
|
|||||||
@@ -1004,7 +1004,7 @@ namespace GitHub.Runner.Worker
|
|||||||
if (actionDefinitionData.Execution.ExecutionType == ActionExecutionType.Container)
|
if (actionDefinitionData.Execution.ExecutionType == ActionExecutionType.Container)
|
||||||
{
|
{
|
||||||
var containerAction = actionDefinitionData.Execution as ContainerActionExecutionData;
|
var containerAction = actionDefinitionData.Execution as ContainerActionExecutionData;
|
||||||
if (containerAction.Image.EndsWith("Dockerfile") || containerAction.Image.EndsWith("dockerfile"))
|
if (DockerUtil.IsDockerfile(containerAction.Image))
|
||||||
{
|
{
|
||||||
var dockerFileFullPath = Path.Combine(actionEntryDirectory, containerAction.Image);
|
var dockerFileFullPath = Path.Combine(actionEntryDirectory, containerAction.Image);
|
||||||
executionContext.Debug($"Dockerfile for action: '{dockerFileFullPath}'.");
|
executionContext.Debug($"Dockerfile for action: '{dockerFileFullPath}'.");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace GitHub.Runner.Worker.Container
|
namespace GitHub.Runner.Worker.Container
|
||||||
@@ -61,5 +62,15 @@ namespace GitHub.Runner.Worker.Container
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsDockerfile(string image)
|
||||||
|
{
|
||||||
|
if (image.StartsWith("docker://", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var imageWithoutPath = image.Split('/').Last();
|
||||||
|
return imageWithoutPath.StartsWith("Dockerfile.") || imageWithoutPath.StartsWith("dockerfile.") || imageWithoutPath.EndsWith("Dockerfile") || imageWithoutPath.EndsWith("dockerfile");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ namespace GitHub.Runner.Worker
|
|||||||
|
|
||||||
public sealed class CreateStepSummaryCommand : RunnerService, IFileCommandExtension
|
public sealed class CreateStepSummaryCommand : RunnerService, IFileCommandExtension
|
||||||
{
|
{
|
||||||
private const int _attachmentSizeLimit = 128 * 1024;
|
public const int AttachmentSizeLimit = 1024 * 1024;
|
||||||
|
|
||||||
public string ContextName => "step_summary";
|
public string ContextName => "step_summary";
|
||||||
public string FilePrefix => "step_summary_";
|
public string FilePrefix => "step_summary_";
|
||||||
@@ -296,9 +296,9 @@ namespace GitHub.Runner.Worker
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileSize > _attachmentSizeLimit)
|
if (fileSize > AttachmentSizeLimit)
|
||||||
{
|
{
|
||||||
context.Error(String.Format(Constants.Runner.UnsupportedSummarySize, _attachmentSizeLimit / 1024, fileSize / 1024));
|
context.Error(String.Format(Constants.Runner.UnsupportedSummarySize, AttachmentSizeLimit / 1024, fileSize / 1024));
|
||||||
Trace.Info($"Step Summary file ({filePath}) is too large ({fileSize} bytes); skipping attachment upload");
|
Trace.Info($"Step Summary file ({filePath}) is too large ({fileSize} bytes); skipping attachment upload");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -44,9 +44,8 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
{
|
{
|
||||||
Data.Image = Data.Image.Substring("docker://".Length);
|
Data.Image = Data.Image.Substring("docker://".Length);
|
||||||
}
|
}
|
||||||
else if (Data.Image.EndsWith("Dockerfile") || Data.Image.EndsWith("dockerfile"))
|
else if (DockerUtil.IsDockerfile(Data.Image))
|
||||||
{
|
{
|
||||||
// ensure docker file exist
|
|
||||||
var dockerFile = Path.Combine(ActionDirectory, Data.Image);
|
var dockerFile = Path.Combine(ActionDirectory, Data.Image);
|
||||||
ArgUtil.File(dockerFile, nameof(Data.Image));
|
ArgUtil.File(dockerFile, nameof(Data.Image));
|
||||||
|
|
||||||
@@ -68,6 +67,10 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
|
|
||||||
Data.Image = imageName;
|
Data.Image = imageName;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException($"'{Data.Image}' should be either '[path]/Dockerfile' or 'docker://image[:tag]'.");
|
||||||
|
}
|
||||||
|
|
||||||
string type = Action.Type == Pipelines.ActionSourceType.Repository ? "Dockerfile" : "DockerHub";
|
string type = Action.Type == Pipelines.ActionSourceType.Repository ? "Dockerfile" : "DockerHub";
|
||||||
// Set extra telemetry base on the current context.
|
// Set extra telemetry base on the current context.
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ namespace GitHub.Services.Common.ClientStorage
|
|||||||
private readonly string m_filePath;
|
private readonly string m_filePath;
|
||||||
private readonly VssFileStorageReader m_reader;
|
private readonly VssFileStorageReader m_reader;
|
||||||
private readonly IVssClientStorageWriter m_writer;
|
private readonly IVssClientStorageWriter m_writer;
|
||||||
|
|
||||||
private const char c_defaultPathSeparator = '\\';
|
private const char c_defaultPathSeparator = '\\';
|
||||||
private const bool c_defaultIgnoreCaseInPaths = false;
|
private const bool c_defaultIgnoreCaseInPaths = false;
|
||||||
|
|
||||||
@@ -192,7 +191,7 @@ namespace GitHub.Services.Common.ClientStorage
|
|||||||
// Windows Impersonation is being used.
|
// Windows Impersonation is being used.
|
||||||
|
|
||||||
// Check to see if we can find the user's local application data directory.
|
// Check to see if we can find the user's local application data directory.
|
||||||
string subDir = "GitHub\\ActionsService";
|
string subDir = Path.Combine("GitHub", "ActionsService");
|
||||||
string path = Environment.GetEnvironmentVariable("localappdata");
|
string path = Environment.GetEnvironmentVariable("localappdata");
|
||||||
SafeGetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
SafeGetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||||
if (string.IsNullOrEmpty(path))
|
if (string.IsNullOrEmpty(path))
|
||||||
|
|||||||
@@ -144,5 +144,48 @@ namespace GitHub.Runner.Common.Tests.Worker.Container
|
|||||||
var actual = DockerUtil.ParseRegistryHostnameFromImageName(input);
|
var actual = DockerUtil.ParseRegistryHostnameFromImageName(input);
|
||||||
Assert.Equal(expected, actual);
|
Assert.Equal(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Theory]
|
||||||
|
[Trait("Level", "L0")]
|
||||||
|
[Trait("Category", "Worker")]
|
||||||
|
[InlineData("dockerhub/repo", false)]
|
||||||
|
[InlineData("debian:latest", false)]
|
||||||
|
[InlineData("something/dockerfileimage", false)]
|
||||||
|
[InlineData("ghcr.io/docker/dockerfile", true)] // should be false but might break the current workflows
|
||||||
|
[InlineData("Dockerfile", true)]
|
||||||
|
[InlineData("Dockerfile.", true)]
|
||||||
|
[InlineData(".Dockerfile", true)]
|
||||||
|
[InlineData(".Dockerfile.", false)]
|
||||||
|
[InlineData("dockerfile", true)]
|
||||||
|
[InlineData("dockerfile.", true)]
|
||||||
|
[InlineData(".dockerfile", true)]
|
||||||
|
[InlineData(".dockerfile.", false)]
|
||||||
|
[InlineData("Dockerfile.test", true)]
|
||||||
|
[InlineData("test.Dockerfile", true)]
|
||||||
|
[InlineData("docker/dockerfile:latest", false)]
|
||||||
|
[InlineData("/some/path/dockerfile:latest", false)]
|
||||||
|
[InlineData("dockerfile:latest", false)]
|
||||||
|
[InlineData("Dockerfile:latest", false)]
|
||||||
|
[InlineData("dockerfile-latest", false)]
|
||||||
|
[InlineData("Dockerfile-latest", false)]
|
||||||
|
[InlineData("dockerfile.latest", true)]
|
||||||
|
[InlineData("Dockerfile.latest", true)]
|
||||||
|
[InlineData("../dockerfile/dockerfileone", false)]
|
||||||
|
[InlineData("../Dockerfile/dockerfileone", false)]
|
||||||
|
[InlineData("../dockerfile.test", true)]
|
||||||
|
[InlineData("../Dockerfile.test", true)]
|
||||||
|
[InlineData("./dockerfile/image", false)]
|
||||||
|
[InlineData("./Dockerfile/image", false)]
|
||||||
|
[InlineData("example/Dockerfile.test", true)]
|
||||||
|
[InlineData("./example/Dockerfile.test", true)]
|
||||||
|
[InlineData("example/test.dockerfile", true)]
|
||||||
|
[InlineData("./example/test.dockerfile", true)]
|
||||||
|
[InlineData("docker://Dockerfile", false)]
|
||||||
|
[InlineData("docker://ubuntu:latest", false)]
|
||||||
|
public void IsDockerfile(string input, bool expected)
|
||||||
|
{
|
||||||
|
var actual = DockerUtil.IsDockerfile(input);
|
||||||
|
Assert.Equal(expected, actual);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
using (var hostContext = Setup())
|
using (var hostContext = Setup())
|
||||||
{
|
{
|
||||||
var stepSummaryFile = Path.Combine(_rootDirectory, "empty-file");
|
var stepSummaryFile = Path.Combine(_rootDirectory, "empty-file");
|
||||||
File.WriteAllBytes(stepSummaryFile, new byte[128 * 1024 + 1]);
|
File.WriteAllBytes(stepSummaryFile, new byte[CreateStepSummaryCommand.AttachmentSizeLimit + 1]);
|
||||||
|
|
||||||
_createStepCommand.ProcessCommand(_executionContext.Object, stepSummaryFile, null);
|
_createStepCommand.ProcessCommand(_executionContext.Object, stepSummaryFile, null);
|
||||||
_jobExecutionContext.Complete();
|
_jobExecutionContext.Complete();
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.290.0
|
2.291.0
|
||||||
|
|||||||
Reference in New Issue
Block a user