mirror of
https://github.com/actions/runner.git
synced 2025-12-12 15:13:30 +00:00
For Main Steps, just run the step, don't check condition (#1273)
* For Main Steps, just run the step, don't check condition * fix whitespace * pr feedback
This commit is contained in:
@@ -294,6 +294,14 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
// Register Callback
|
||||
CancellationTokenRegistration? jobCancelRegister = null;
|
||||
try
|
||||
{
|
||||
// For main steps just run the action
|
||||
if (stage == ActionRunStage.Main)
|
||||
{
|
||||
await RunStepAsync(step);
|
||||
}
|
||||
// We need to evaluate conditions for pre/post steps
|
||||
else
|
||||
{
|
||||
// Register job cancellation call back only if job cancellation token not been fire before each step run
|
||||
if (!ExecutionContext.Root.CancellationToken.IsCancellationRequested)
|
||||
@@ -389,6 +397,7 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
await RunStepAsync(step);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (jobCancelRegister != null)
|
||||
|
||||
Reference in New Issue
Block a user