Detect failing steps in custom action's post

Hi there,

I was creating a custom node action. In my post action part I need to find out if any of the non-post-steps failed/were skipped. Either way, the action is supposed to do something - hence post-if is off the table.

While investigating on my options I found that listJobsOfWorkflowRun has the peculiar behaviour of having jumping step numbers once a post-action-step is reached (making it possible to poll until all non-post-steps are completed).

But there is about 0 documentation on why the number is jumping and whether it’s safe to use this as means to determine the first post-step.

In case an example is needed: the example from the docs shows this behaviour as well, where the step number in the response increments by more than one in the post cache step: https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run

Has anybody any idea or documentation at hand to clarify the number-jumping or an even better solution to my actual problem?