mirror of
https://github.com/actions/runner.git
synced 2025-12-12 14:17:46 +00:00
Compare commits
1 Commits
Duplicated
...
users/tihu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
690d4f769b |
@@ -1,16 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Linq;
|
||||||
using GitHub.Runner.Common;
|
|
||||||
using GitHub.Runner.Sdk;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using GitHub.DistributedTask.Pipelines.ObjectTemplating;
|
using System.Threading;
|
||||||
using GitHub.DistributedTask.ObjectTemplating.Schema;
|
|
||||||
using GitHub.DistributedTask.ObjectTemplating;
|
using GitHub.DistributedTask.ObjectTemplating;
|
||||||
|
using GitHub.DistributedTask.ObjectTemplating.Schema;
|
||||||
using GitHub.DistributedTask.ObjectTemplating.Tokens;
|
using GitHub.DistributedTask.ObjectTemplating.Tokens;
|
||||||
using GitHub.DistributedTask.Pipelines.ContextData;
|
using GitHub.DistributedTask.Pipelines.ContextData;
|
||||||
using System.Linq;
|
using GitHub.DistributedTask.Pipelines.ObjectTemplating;
|
||||||
|
using GitHub.Runner.Common;
|
||||||
|
using GitHub.Runner.Sdk;
|
||||||
using Pipelines = GitHub.DistributedTask.Pipelines;
|
using Pipelines = GitHub.DistributedTask.Pipelines;
|
||||||
|
|
||||||
namespace GitHub.Runner.Worker
|
namespace GitHub.Runner.Worker
|
||||||
@@ -130,7 +130,7 @@ namespace GitHub.Runner.Worker
|
|||||||
actionDefinition.Execution = ConvertRuns(executionContext, templateContext, actionRunValueToken, fileRelativePath, actionOutputs);
|
actionDefinition.Execution = ConvertRuns(executionContext, templateContext, actionRunValueToken, fileRelativePath, actionOutputs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex) when (!(ex is TemplateValidationException))
|
||||||
{
|
{
|
||||||
Trace.Error(ex);
|
Trace.Error(ex);
|
||||||
templateContext.Errors.Add(ex);
|
templateContext.Errors.Add(ex);
|
||||||
@@ -141,7 +141,7 @@ namespace GitHub.Runner.Worker
|
|||||||
foreach (var error in templateContext.Errors)
|
foreach (var error in templateContext.Errors)
|
||||||
{
|
{
|
||||||
Trace.Error($"Action.yml load error: {error.Message}");
|
Trace.Error($"Action.yml load error: {error.Message}");
|
||||||
executionContext.Error("And let's duplicate errors: " + error.Message);
|
executionContext.Error(error.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new ArgumentException($"Fail to load {fileRelativePath}");
|
throw new ArgumentException($"Fail to load {fileRelativePath}");
|
||||||
@@ -416,7 +416,14 @@ namespace GitHub.Runner.Worker
|
|||||||
break;
|
break;
|
||||||
case "steps":
|
case "steps":
|
||||||
var stepsToken = run.Value.AssertSequence("steps");
|
var stepsToken = run.Value.AssertSequence("steps");
|
||||||
steps = PipelineTemplateConverter.ConvertToSteps(templateContext, stepsToken);
|
try
|
||||||
|
{
|
||||||
|
steps = PipelineTemplateConverter.ConvertToSteps(templateContext, stepsToken);
|
||||||
|
}
|
||||||
|
catch (Exception ex) when (!(ex is TemplateValidationException))
|
||||||
|
{
|
||||||
|
templateContext.Errors.Add(ex);
|
||||||
|
}
|
||||||
templateContext.Errors.Check();
|
templateContext.Errors.Check();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1401,7 +1401,7 @@ namespace GitHub.Runner.Worker
|
|||||||
|
|
||||||
public void Error(string format, params Object[] args)
|
public void Error(string format, params Object[] args)
|
||||||
{
|
{
|
||||||
_executionContext.Error("error from template trace writer: " + string.Format(CultureInfo.CurrentCulture, format, args));
|
_executionContext.Error(string.Format(CultureInfo.CurrentCulture, format, args));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Info(string format, params Object[] args)
|
public void Info(string format, params Object[] args)
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ namespace GitHub.DistributedTask.ObjectTemplating
|
|||||||
{
|
{
|
||||||
if (!keys.Contains(property.Key))
|
if (!keys.Contains(property.Key))
|
||||||
{
|
{
|
||||||
m_context.Error(mapping, "Template evaluator error " + $"Required property is missing: {property.Key}");
|
m_context.Error(mapping, $"Required property is missing: {property.Key}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ namespace GitHub.DistributedTask.ObjectTemplating
|
|||||||
nonDuplicates.Sort();
|
nonDuplicates.Sort();
|
||||||
|
|
||||||
String listToDeDuplicate = String.Join(", ", nonDuplicates);
|
String listToDeDuplicate = String.Join(", ", nonDuplicates);
|
||||||
m_context.Error(mapping, "Template reader error: " + TemplateStrings.UnableToDetermineOneOf(listToDeDuplicate));
|
m_context.Error(mapping, TemplateStrings.UnableToDetermineOneOf(listToDeDuplicate));
|
||||||
}
|
}
|
||||||
else if (mappingDefinitions.Count == 1 && !hasExpressionKey)
|
else if (mappingDefinitions.Count == 1 && !hasExpressionKey)
|
||||||
{
|
{
|
||||||
@@ -289,7 +289,7 @@ namespace GitHub.DistributedTask.ObjectTemplating
|
|||||||
{
|
{
|
||||||
if (!keys.Contains(property.Key))
|
if (!keys.Contains(property.Key))
|
||||||
{
|
{
|
||||||
m_context.Error(mapping, "Template Reader error " + $"Required property is missing: {property.Key}");
|
m_context.Error(mapping, $"Required property is missing: {property.Key}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user