Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
clock

GitHub Action

Workflow Queue

v1.0.1

Workflow Queue

clock

Workflow Queue

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

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Workflow Queue

uses: ahmadnassri/action-workflow-queue@v1.0.1

Learn more about this action in ahmadnassri/action-workflow-queue

Choose a version

GitHub Action: Workflow Run Wait

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

license release super linter test semantic

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

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 • Twitter: @AhmadNassri