Queuing Github Actions

I want to add the new github action in the queue and wait until the previous is build is completed (doesn’t matter whether it is successful or failure build)

You can specify multiple jobs or steps and establish dependencies with the needs keyword. You can also use a condition such as if: always() or if: !cancelled() to address your ‘whether success or failure’ requirement.

@tbhaxor Do you mean that you don’t want another workflow run to start until an already running one finishes? I don’t think that this is possible without hacks. The on: push event triggers a workflow run immediately, and how many of its jobs are executed in parallel depends on your account:

This cannot be configured to my knowledge (you can control how many jobs of a job matrix are executed in parallel though). You could perhaps defer the execution of a workflow by doing an external API request with an action, to see if another workflow run is already in progress. Note that there is a timeout for jobs of 6 hours however.

You could also cancel workflow runs if there’s another in progress already and use the workflow_run event conditionally to invoke a subsequent run:

1 Like

Thnx bro, let’s see when github works on this