Pause until a job in another workflow completes successfully.
Ruby
396
129 commits
updated Aug 9, 2026
Pause until a job in another workflow completes successfully.
This action uses GitHub's Checks API to poll for check results. On success, the action exits allowing the workflow to resume. Otherwise, the action exits with status code 1 and fails the workflow.
[!TIP] Prefer to skip the Ruby setup overhead?
wait-on-check-action-tsis a TypeScript port that runs as a nativenode24action with no setup step, while keeping the same parameters, defaults, and behavior.
repository_dispatch or external eventsneedsworkflow_runWorkflow A - Runs tests
name: Test
on: [push]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test
Workflow B - Waits for tests before publishing
name: Publish
on: [push]
jobs:
publish:
name: Publish the package
runs-on: ubuntu-latest
steps:
- name: Wait for tests to succeed
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- uses: actions/checkout@v4
- run: npm publish
| Input | Description | Example |
|---|---|---|
ref | Git ref to check (branch/tag/commit SHA) | ${{ github.ref }} |
repo-token | GitHub token for API access | ${{ secrets.GITHUB_TOKEN }} |
| Input | Description | Example | Default |
|---|---|---|---|
allowed-conclusions | Comma-separated list of acceptable conclusions | success,skipped | success,skipped |
api-endpoint | Custom GitHub API endpoint (for GHE) | https://github.mycompany.com/api/v3 | - |
bundler-cache | Enable Bundler cache in ruby/setup-ruby | true | true |
check-name | Specific check name to wait for | "Run tests" | - |
check-regexp | Filter checks using regex pattern | "test-.*" | - |
checks-discovery-timeout | Seconds to wait for checks to be discovered | 60 | 60 |
fail-on-no-checks | Fail the action if no checks match the check-name or check-regexp filters | true | true |
ignore-checks | Comma-separated list of checks to ignore | optional-lint,coverage-report | - |
running-workflow-name | Name of current workflow (to exclude from waiting) | "Deploy" | - |
verbose | Print detailed logs | true | true |
wait-interval | Seconds between API requests | 10 | 10 |
wait-for-duplicates | Require every check with a duplicate name to succeed | false | false |
- name: Wait for tests
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
jobs:
publish:
name: Publish the package
runs-on: ubuntu-latest
steps:
- name: Wait for other checks to succeed
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
running-workflow-name: "Publish the package"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for all test jobs
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.sha }}
check-regexp: "test-.*"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for checks (allow cancelled)
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
allowed-conclusions: success,skipped,cancelled
- name: Wait for checks (ignore some)
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.sha }}
running-workflow-name: "Deploy"
ignore-checks: "optional-lint,coverage-report"
repo-token: ${{ secrets.GITHUB_TOKEN }}
By default, if you use check-name or check-regexp and no checks match the filter, the action will fail with the message "The requested check was never run against this ref, exiting...".
If you want the action to succeed when no checks match the filter (useful for conditional workflows where certain checks only run on specific file changes), you can set fail-on-no-checks to false:
name: Wait for optional checks
on:
push:
jobs:
wait-for-optional-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Wait on optional tests
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
running-workflow-name: wait-for-optional-checks
check-regexp: optional-.*
fail-on-no-checks: false
When a job uses needs it isn't created until the dependent jobs are completed.
If you want to extend the discovery time window to wait for jobs to be created, you can set checks-discovery-timeout:
jobs:
setup:
# Some slow setup job
test:
needs: setup
name: Run Tests
- name: Wait for tests
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
checks-discovery-timeout: 300
Some services publish multiple check_runs under the same name on a single
commit — one per environment, retry, or internal worker. By default only the
most recent run for a given name is considered, so when these runs finish at
different times the first one to complete determines the reported status. A
single early failure can then fail the wait even though a later run of the same
name succeeds, making the result non-deterministic from one CI run to the next.
Set wait-for-duplicates: true to require every check sharing a name to
succeed before the action continues:
- name: Wait for deploy preview
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Deploy Preview"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-for-duplicates: true
The check name corresponds to jobs.<job_id>.name in your workflow:
# Check name: "test" (uses job ID)
jobs:
test:
runs-on: ubuntu-latest
steps: [...]
# Check name: "Run tests" (uses explicit name)
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps: [...]
# Check names: "Run tests (3.9)", "Run tests (3.10)", etc.
jobs:
test:
name: Run tests
strategy:
matrix:
python: ['3.9', '3.10', '3.11']
To inspect check names via the API:
curl -H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/OWNER/REPO/commits/REF/check-runs \
| jq '[.check_runs[].name]'
When using this action in a reusable workflow, the check name includes both the caller and callee job names:
.github/workflows/caller.yml
on: push
jobs:
caller:
uses: ./.github/workflows/callee.yml
.github/workflows/callee.yml
on: workflow_call
jobs:
callee:
runs-on: ubuntu-latest
steps:
- name: Wait for other workflows
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
running-workflow-name: "caller / callee"
repo-token: ${{ secrets.GITHUB_TOKEN }}
Pass your GHE API endpoint:
- name: Wait for tests (GHE)
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-endpoint: https://github.mycompany.com/api/v3
wait-interval if needed.needsFor jobs in the same workflow, use the native needs keyword:
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: npm test
deploy:
needs: test # Waits for test to complete successfully
runs-on: ubuntu-latest
steps:
- run: npm run deploy
workflow_runFor triggering workflows on the default branch after another workflow completes:
name: Deploy
on:
workflow_run:
workflows: ["Test"]
types: [completed]
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- run: npm run deploy
Limitations of workflow_run:
if conditionTo install dependencies:
bundle install
Some packages must be installed from npm and PyPI:
npm install cspell husky prettier
pip install bump2version trufflehog3
To run tests:
bundle exec rspec
There are sample workflows in the .github/workflows directory that demonstrate the action. The wait_omitting-check-name workflow waits for two simple tasks, while wait_using_check-name only waits for a specific task.
To generate the documentation locally:
bundle exec yard
To run linters:
npx cspell . --dot --gitignore
bundle exec rubocop
trufflehog3 --no-history
To run formatters:
prettier . --write
Please read our Code of Conduct and Changelog before contributing.
This repository uses semantic versioning.
bump2version is used to version and tag changes, for example:
bump2version patch # 1.4.1 → 1.4.2
bump2version minor # 1.4.1 → 1.5.0
bump2version major # 1.4.1 → 2.0.0
See the LICENSE file.
Ruby
99.2%
Pause until a job in another workflow completes successfully.
Ruby
396
129 commits
updated Aug 9, 2026
Pause until a job in another workflow completes successfully.
This action uses GitHub's Checks API to poll for check results. On success, the action exits allowing the workflow to resume. Otherwise, the action exits with status code 1 and fails the workflow.
[!TIP] Prefer to skip the Ruby setup overhead?
wait-on-check-action-tsis a TypeScript port that runs as a nativenode24action with no setup step, while keeping the same parameters, defaults, and behavior.
repository_dispatch or external eventsneedsworkflow_runWorkflow A - Runs tests
name: Test
on: [push]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test
Workflow B - Waits for tests before publishing
name: Publish
on: [push]
jobs:
publish:
name: Publish the package
runs-on: ubuntu-latest
steps:
- name: Wait for tests to succeed
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- uses: actions/checkout@v4
- run: npm publish
| Input | Description | Example |
|---|---|---|
ref | Git ref to check (branch/tag/commit SHA) | ${{ github.ref }} |
repo-token | GitHub token for API access | ${{ secrets.GITHUB_TOKEN }} |
| Input | Description | Example | Default |
|---|---|---|---|
allowed-conclusions | Comma-separated list of acceptable conclusions | success,skipped | success,skipped |
api-endpoint | Custom GitHub API endpoint (for GHE) | https://github.mycompany.com/api/v3 | - |
bundler-cache | Enable Bundler cache in ruby/setup-ruby | true | true |
check-name | Specific check name to wait for | "Run tests" | - |
check-regexp | Filter checks using regex pattern | "test-.*" | - |
checks-discovery-timeout | Seconds to wait for checks to be discovered | 60 | 60 |
fail-on-no-checks | Fail the action if no checks match the check-name or check-regexp filters | true | true |
ignore-checks | Comma-separated list of checks to ignore | optional-lint,coverage-report | - |
running-workflow-name | Name of current workflow (to exclude from waiting) | "Deploy" | - |
verbose | Print detailed logs | true | true |
wait-interval | Seconds between API requests | 10 | 10 |
wait-for-duplicates | Require every check with a duplicate name to succeed | false | false |
- name: Wait for tests
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
jobs:
publish:
name: Publish the package
runs-on: ubuntu-latest
steps:
- name: Wait for other checks to succeed
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
running-workflow-name: "Publish the package"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for all test jobs
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.sha }}
check-regexp: "test-.*"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for checks (allow cancelled)
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
allowed-conclusions: success,skipped,cancelled
- name: Wait for checks (ignore some)
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.sha }}
running-workflow-name: "Deploy"
ignore-checks: "optional-lint,coverage-report"
repo-token: ${{ secrets.GITHUB_TOKEN }}
By default, if you use check-name or check-regexp and no checks match the filter, the action will fail with the message "The requested check was never run against this ref, exiting...".
If you want the action to succeed when no checks match the filter (useful for conditional workflows where certain checks only run on specific file changes), you can set fail-on-no-checks to false:
name: Wait for optional checks
on:
push:
jobs:
wait-for-optional-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Wait on optional tests
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
running-workflow-name: wait-for-optional-checks
check-regexp: optional-.*
fail-on-no-checks: false
When a job uses needs it isn't created until the dependent jobs are completed.
If you want to extend the discovery time window to wait for jobs to be created, you can set checks-discovery-timeout:
jobs:
setup:
# Some slow setup job
test:
needs: setup
name: Run Tests
- name: Wait for tests
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
checks-discovery-timeout: 300
Some services publish multiple check_runs under the same name on a single
commit — one per environment, retry, or internal worker. By default only the
most recent run for a given name is considered, so when these runs finish at
different times the first one to complete determines the reported status. A
single early failure can then fail the wait even though a later run of the same
name succeeds, making the result non-deterministic from one CI run to the next.
Set wait-for-duplicates: true to require every check sharing a name to
succeed before the action continues:
- name: Wait for deploy preview
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Deploy Preview"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-for-duplicates: true
The check name corresponds to jobs.<job_id>.name in your workflow:
# Check name: "test" (uses job ID)
jobs:
test:
runs-on: ubuntu-latest
steps: [...]
# Check name: "Run tests" (uses explicit name)
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps: [...]
# Check names: "Run tests (3.9)", "Run tests (3.10)", etc.
jobs:
test:
name: Run tests
strategy:
matrix:
python: ['3.9', '3.10', '3.11']
To inspect check names via the API:
curl -H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/OWNER/REPO/commits/REF/check-runs \
| jq '[.check_runs[].name]'
When using this action in a reusable workflow, the check name includes both the caller and callee job names:
.github/workflows/caller.yml
on: push
jobs:
caller:
uses: ./.github/workflows/callee.yml
.github/workflows/callee.yml
on: workflow_call
jobs:
callee:
runs-on: ubuntu-latest
steps:
- name: Wait for other workflows
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
running-workflow-name: "caller / callee"
repo-token: ${{ secrets.GITHUB_TOKEN }}
Pass your GHE API endpoint:
- name: Wait for tests (GHE)
uses: lewagon/wait-on-check-action@v1.9.1
with:
ref: ${{ github.ref }}
check-name: "Run tests"
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-endpoint: https://github.mycompany.com/api/v3
wait-interval if needed.needsFor jobs in the same workflow, use the native needs keyword:
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: npm test
deploy:
needs: test # Waits for test to complete successfully
runs-on: ubuntu-latest
steps:
- run: npm run deploy
workflow_runFor triggering workflows on the default branch after another workflow completes:
name: Deploy
on:
workflow_run:
workflows: ["Test"]
types: [completed]
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- run: npm run deploy
Limitations of workflow_run:
if conditionTo install dependencies:
bundle install
Some packages must be installed from npm and PyPI:
npm install cspell husky prettier
pip install bump2version trufflehog3
To run tests:
bundle exec rspec
There are sample workflows in the .github/workflows directory that demonstrate the action. The wait_omitting-check-name workflow waits for two simple tasks, while wait_using_check-name only waits for a specific task.
To generate the documentation locally:
bundle exec yard
To run linters:
npx cspell . --dot --gitignore
bundle exec rubocop
trufflehog3 --no-history
To run formatters:
prettier . --write
Please read our Code of Conduct and Changelog before contributing.
This repository uses semantic versioning.
bump2version is used to version and tag changes, for example:
bump2version patch # 1.4.1 → 1.4.2
bump2version minor # 1.4.1 → 1.5.0
bump2version major # 1.4.1 → 2.0.0
See the LICENSE file.
Ruby
99.2%