Shell script dying early with no error message in github action

Hi,

we have a github action that executes a shell script as a part of it. However, some week it works, some week it fails. When it fails, the script does not get completed (and therefore, does not produce the expected output). However, the github action shows to be succeeded and also the debug output from the shell script does not reveal anything. Here is a link to a failed action. In the step, Produce report, the executed shell script stops abruptly before a function declaration and returns with a success code.

Note that, the script runs as expected when run locally. I am not sure why the script is getting stopped midway, and even if there’s an error, why is the error message not available?