← 输入框|github.com|刷新
Skip to content

About

if a given workflow is already running, that this action isn't running as a part of, then wait for it to finish

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

GitHub Action: Workflow Run Queue

if a given workflow is already running, that this action isn't running as a part of, then wait for it to finish

license release

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

    permissions:
      actions: read

    steps:
      - uses: actions/checkout@v2
      - uses: durable-code/workflow-queue
        with:
          run-id: ${{ github.run_id }}

      # 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
run-id ✅ - The ${{ github.run_id }} of the caller workflow
timeout ❌ 600000 timeout before we stop trying (in milliseconds)
delay ❌ 10000 delay between status checks (in milliseconds)

Adapted from https://github.com/ahmadnassri/action-workflow-queue

Author: Ahmad Nassri • Twitter: @AhmadNassri

About

if a given workflow is already running, that this action isn't running as a part of, then wait for it to finish

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages