Skip to content

A GitHub Action that triggers a workflow and waits for it to succeed before proceeding

License

Notifications You must be signed in to change notification settings

yougov-datascience/dispatch-and-wait

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dispatch-and-wait

A GitHub Action that triggers a workflow and waits for it to succeed before proceeding. Largely based off of Trigger Workflow and Wait.

Arguments

Name Required Default Description
owner true N/A Owner of the repo where the workflow is to be triggered.
repo true N/A The repo where the workflow is to be triggered.
token true N/A An access token with write permissions to repo.
event_type true N/A The event type parameter to be passed in the repository dispatch request.
client_payload false "{}" The client payload parameter to be passed in the repository dispatch request. Should be in the format '{"key1": "value1", "key2": "value2"}'.
wait_time false 10 Time to wait between workflow status checks, in seconds.
max_time false 60 Maximum time to wait for the workflow to finish before exiting, in seconds.

Example usages

Basic use with user-added secret called ACCESS_TOKEN:

- uses: felixp8/[email protected]
  with:
    owner: username
    repo: reponame
    token: ${{ secrets.ACCESS_TOKEN }}
    event_type: ping

Use with default GITHUB_TOKEN and optional inputs:

- uses: felixp8/[email protected]
  with:
    owner: username
    repo: reponame
    token: ${{ secrets.GITHUB_TOKEN }}
    event_type: ping
    client_payload: '{"ref": "master"}'
    wait_time: 5
    max_time: 120

About

A GitHub Action that triggers a workflow and waits for it to succeed before proceeding

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 93.1%
  • Dockerfile 6.9%