github-action-wait-for-status
github-action-wait-for-status copied to clipboard
Add the feature to timeout after some time
This could be useful to fail gracefully instead of indefinitely consuming the runner minutes
Nevermind. I discovered this can be done natively from the workflow itself by using https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes
It's not a bad idea actually. Using the native way will kill the process and (assuming) fail the workflow. But by letting this action handle that it can assume a green status after an X amount of seconds.
@WyriHaximus in fact, for my case what I want/need is to fail after some time. As an example: for stuck CI stuff I don't want to waste runner minutes, but I also don't want to succeed if not completed successfully. Said that, yep, if what you want is to succeed after some time you can't do it natively, so you need to rely on the action to handle it.
FYI: I can confirm the native timeout results in failure
@juan-vg Would make both the timeout and the exit code (so success or failure) configurable work for you? Looking at adding this to 1.9 before overhauling internals in 1.10
@WyriHaximus as I said, for my use-case the native way is just enough. However, I believe making those 2 parameters configurable will work for mostly all (if not all) use-cases
@juan-vg Ok cool, just wanted to make sure your use case would be coverable by providing that from the action 👍 . You do you and use what works best for you.