Skip to content

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

License

Notifications You must be signed in to change notification settings

joreetz-otto/action-workflow-queue

 
 

Repository files navigation

GitHub Action: Workflow Run Wait

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

license test

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-latest

    steps:
      - uses: joreetz-otto/action-workflow-queue@v2.0.3

      # only runs additional steps if there is no other instance of `my-workflow.yml` currently running

Inputs

input required default description
github-token github.token The GitHub token used to call the GitHub API
timeout 600000 timeout before we stop trying (in milliseconds)
delay 10000 delay between status checks (in milliseconds)

Author: Ahmad Nassri • Maintainer: [Jonas Reetz] •

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 89.8%
  • Dockerfile 10.2%