Skip to content

Repository files navigation

GitHub Action: Workflow Run Queue

If the same workflow is already running from a previous commit, wait for it to finish

licenserelease

Why?

Workflows run on every commit asynchronously, this is fine for most cases, however, you might want to wait for a previous commit workflow to finish before running another one, some example use-cases:

  • Deployment workflows
  • Terraform workflows
  • Database Migrations

Usage

.github/workflows/my-workflow.yml
jobs:
xyz:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-workflow-queue@v1# only runs additional steps if there is no other instance of `my-workflow.yml` currently running

Inputs

inputrequireddefaultdescription
github-tokengithub.tokenThe GitHub token used to call the GitHub API
timeout600000timeout before we stop trying (in milliseconds)
delay10000delay between status checks (in milliseconds)
wait-other-workflowslist of other workflow ids separated by "," to wait for

Author: Ahmad Nassri • Twitter: @AhmadNassri

About

if the same workflow is already running from a previous commit, wait for it to finish

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages