diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index d189827e7..120ee2e0b 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -309,12 +309,6 @@ namespace GitHub.Runner.Worker Result = result; } - // update context - if (!string.IsNullOrEmpty(ContextName)) - { - StepsContext.SetConclusion(ScopeName, ContextName, Result.Value.ToContextData()); - } - // report total delay caused by server throttling. if (_totalThrottlingDelayInMilliseconds > 0) { @@ -348,6 +342,12 @@ namespace GitHub.Runner.Worker _logger.End(); + // update context + if (!string.IsNullOrEmpty(ContextName)) + { + StepsContext.SetConclusion(ScopeName, ContextName, Result.Value.ToContextData()); + } + return Result.Value; }