mirror of
https://github.com/actions/runner.git
synced 2025-12-13 19:03:44 +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
|
// Register Callback
|
||||||
CancellationTokenRegistration? jobCancelRegister = null;
|
CancellationTokenRegistration? jobCancelRegister = null;
|
||||||
try
|
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
|
// Register job cancellation call back only if job cancellation token not been fire before each step run
|
||||||
if (!ExecutionContext.Root.CancellationToken.IsCancellationRequested)
|
if (!ExecutionContext.Root.CancellationToken.IsCancellationRequested)
|
||||||
@@ -389,6 +397,7 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
await RunStepAsync(step);
|
await RunStepAsync(step);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (jobCancelRegister != null)
|
if (jobCancelRegister != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user