removed throw and else on container action handler (#1873)

* removed throw and else on container action handler

* repaired merge resolution error
This commit is contained in:
Nikola Jokic
2023-06-17 03:53:52 +02:00
committed by GitHub
parent 471e3ae2d9
commit 8415f13bab
4 changed files with 59 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -56,7 +56,7 @@ namespace GitHub.Runner.Worker.Handlers
{
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
dockerFile = Path.Combine(ActionDirectory, Data.Image);