convictional / trigger-workflow-and-wait

Trigger a workflow in another (or same) repository and wait for the job to finish.
MIT License
321 stars 153 forks source link

feat: Reducing time taken when wait_workflow used #7

Closed Steph0 closed 3 years ago

Steph0 commented 3 years ago

The sleep in trigger_workflow is a loss of 10 seconds on Github runners (which cost money) that can be avoided since wait_for_workflow_to_finish will still do the job if user wants to wait for workflow. Especially if a user uses wait_workflow=false since he specifically asks to not wait.

Concerned lines:

echo "Sleeping for $wait_interval seconds"
sleep $wait_interval
Steph0 commented 3 years ago

Up @keithconvictional :)

Steph0 commented 3 years ago

@keithconvictional my pleasure! :)

Steph0 commented 3 years ago

@keithconvictional 😞

keithconvictional commented 3 years ago

@Steph0 released in v1.4.0. Thanks for contributing!

Steph0 commented 3 years ago

@keithconvictional thanks to you! Migrating all our apps to 1.4.0 as of today :)

NotNils commented 2 years ago

I've tested between v1.3 and v1.4 and v1.3 is more stable because of that first 10 second sleep than v1.4, but I like the feature of v1.5 xD