Is the order of workflows by commit?

In some recent commits on a repo with a workflow that runs about 10 minutes I think I saw that the workflows are not started one after another. In some cases I think that is great to have consecutive workflows running (so for multiple commits) but in my case I’ll be uploading an Docker image and want to ensure that the latest upload is indeed from the latest commit.

Is there a way to configure this?

Thank you for asking this question.

The workflows are triggered in the order of event happened time. If all your workflows are using on: push event , then workflows will be ordered by the commits.

Currently , we don’t have a feature to stop triggering new workflow while a run is in progress . There is no method to have consecutive workflows running (so for multiple commits) .

If you only have one workflow to uploading Docker image, the last workflow run for it will always be triggered by the last/latest commit.  But the finish time of running workflows will depending on each workflow runtime. So we could not  ensure the last completed workflow run using the last/latest commit.

We would suggest you to cancel current running workflow runs when a new commit pushed.

And I have reported this issue to the appropriate engineering team for further evaluation. They’ll work on this.

Thanks for the clarification and passing this on! For now I’ll just work around it.