mirror of
https://github.com/actions/runner.git
synced 2025-12-13 10:05:23 +00:00
Defer evaluation of a step's DisplayName until its condition is evaluated. (#2313)
* Defer evaluation of a step's DisplayName until its condition is evaluated. * Formalize TryUpdateDisplayName and EvaluateDisplayName as members of interface `IStep` (#2374)
This commit is contained in:
committed by
GitHub
parent
3cd76671dd
commit
9a228e52e9
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using GitHub.DistributedTask.ObjectTemplating.Tokens;
|
||||
using GitHub.DistributedTask.Pipelines.ContextData;
|
||||
|
||||
namespace GitHub.Runner.Worker
|
||||
{
|
||||
@@ -32,5 +33,18 @@ namespace GitHub.Runner.Worker
|
||||
{
|
||||
await _runAsync(ExecutionContext, _data);
|
||||
}
|
||||
|
||||
public bool TryUpdateDisplayName(out bool updated)
|
||||
{
|
||||
updated = false;
|
||||
return !string.IsNullOrEmpty(this.DisplayName);
|
||||
}
|
||||
|
||||
public bool EvaluateDisplayName(DictionaryContextData contextData, IExecutionContext context, out bool updated)
|
||||
{
|
||||
updated = false;
|
||||
return !string.IsNullOrEmpty(this.DisplayName);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user