GitHub Action
Multiple Repositories Dispatcher
v1.0.2
Latest version
An action to dispatch event to multiple repositories.
- name: Dispatch event
uses: guilouro/multiple-repositories-dispatch@latest
with:
repo_token: ${{ secrets.REPO_TOKEN }}
event_type: event_name
repositories: |
user/repo1
user/repo2
client_payload: '{"github": ${{ toJson(github) }}}'
Name | Required | Description | Default |
---|---|---|---|
repo_token | true |
The Personal Access Token with repo scope of the project which will receive the event |
|
event_type | true |
Event type name that will be used in on: repository_dispatch |
|
repositories | true |
A list of repositories that will receive the event. org/repo |
|
client_payload | false |
JSON payload with extra data | {} |
Obs: The client_payload is able to send a json with a maximum of 10 top-level as a specification of Github API. Therefore, set the value as this example below when need more than 10
client_payload: '{"github": ${{ toJson(github) }}}'
name: Receive Dispatch
on:
repository_dispatch:
types: [event_name]
jobs:
echo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
run: echo ${{ github.event.client_payload }}