Port the 291.1 hotfix to main (#1905)

* Revert "Added ability to run Dockerfile.SUFFIX ContainerAction (#1738)"

20b7e86e47

* port release notes
This commit is contained in:
Thomas Boop
2022-05-22 16:24:18 -04:00
committed by GitHub
parent 0b73794267
commit 5cca207314
6 changed files with 5 additions and 63 deletions

View File

@@ -44,8 +44,9 @@ namespace GitHub.Runner.Worker.Handlers
{
Data.Image = Data.Image.Substring("docker://".Length);
}
else if (DockerUtil.IsDockerfile(Data.Image))
else if (Data.Image.EndsWith("Dockerfile") || Data.Image.EndsWith("dockerfile"))
{
// ensure docker file exist
var dockerFile = Path.Combine(ActionDirectory, Data.Image);
ArgUtil.File(dockerFile, nameof(Data.Image));
@@ -67,10 +68,6 @@ namespace GitHub.Runner.Worker.Handlers
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";
// Set extra telemetry base on the current context.