action-workflow-run-wait
                                
                                 action-workflow-run-wait copied to clipboard
                                
                                    action-workflow-run-wait copied to clipboard
                            
                            
                            
                        wait for all `workflow_run` required workflows to be successful
GitHub Action: Workflow Run Wait
wait for all workflow_run required workflows to be successful
Why?
The workflow_run event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow.
example
on:
workflow_run:
  workflows: [ test ]
  types: 
    - completed
However by itself, this doesn't quite work as expected.
- 
The completedtype, does not indicate success, for that you'd have to include the following in each job of your workflow:if: ${{ github.event.workflow_run.conclusion == 'success' }}
- 
If you're depending on more than one workflow, then ANY of them completing, will trigger the event examplename: deploy on: workflow_run: workflows: [ test, lint, compile ] types: - completedif your testworkflow fails, butlintcompleted successfully,github.event.workflow_run.conclusion == 'success'will still be true
- 
Your workflow will trigger as many times as you have workflow dependencies > _in the previous example, our `deploy` workflow, will run 3 times!_All this makes the workflow_runevent fundamentally broken for any advanced usage, this Action aims to remedy that.Note: See this Community discussion for more info on the topic 
Usage
on:
  workflow_run:
    workflows: [ test-client, test-server ]
    branches: [ master ]
    types: [ completed ]
jobs:
  xyz:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ahmadnassri/action-workflow-run-wait@v1
      # only runs additional steps if [ test-client, test-server ] were successful
Inputs
| input | required | default | description | 
|---|---|---|---|
| github-token | ❌ | github.token | The GitHub token used to call the GitHub API | 
| timeout | ❌ | 30000 | timeout before we stop trying (in milliseconds) | 
| delay | ❌ | 5000 | delay between status checks (in milliseconds) | 
| sha | ❌ | github.sha | Git SHA, if it's different from github.sha | 
| ignore-cancelled | ❌ | false | ignore cancelled workflow runs | 
Author: Ahmad Nassri • Twitter: @AhmadNassri