Only execute post for actions that have one

This commit is contained in:
Ferenc Hammerl
2021-11-12 13:31:37 +01:00
parent 85e1927754
commit 9675941fdb

View File

@@ -269,6 +269,8 @@ namespace GitHub.Runner.Worker
} }
else if (depth > 0) else if (depth > 0)
{ {
var definition = LoadAction(executionContext, action);
if (definition.Data.Execution.HasPost) {
// if we're in a composite action and haven't loaded the local action yet // if we're in a composite action and haven't loaded the local action yet
// we assume it has a post step // we assume it has a post step
if (!_cachedEmbeddedPostSteps.ContainsKey(parentStepId)) if (!_cachedEmbeddedPostSteps.ContainsKey(parentStepId))
@@ -282,6 +284,7 @@ namespace GitHub.Runner.Worker
} }
} }
} }
}
return state; return state;
} }