defenseunicorns / maru-runner

The Unicorn Task Runner
Apache License 2.0
11 stars 1 forks source link

Provide conditional task helpers (`always`, `failure`, ...) #164

Open mjnagel opened 1 month ago

mjnagel commented 1 month ago

Is your feature request related to a problem? Please describe

When running tasks it is often useful to conditionally run a given action on a hook/based on the status of other actions run. A specific use case would be running a test and conditionally running some debug output on failure, or always running some cleanup tasks to remove test resources.

Describe the solution you'd like

I think a few specific helpers would be useful to start. These suggestions are based on GitHub's status check functions, but could be changed to whatever, the behavior is the important part:

Describe alternatives you've considered

Most of this type of logic could be implemented with shell scripts, run via cmd, but that reduces some options for using built in wait actions and chaining together multiple discreet tasks.

### Tasks