Skip to content

Multiple Repositories Dispatcher

Actions
An action to dispatch event to multiple repositories
v1.0.2
Latest
Star (11)

Multiple Repositories Dispatch

An action to dispatch event to multiple repositories.

How to use

- 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) }}}'

Action params

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) }}}'

How to receive the event

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 }}

License

MIT

Multiple Repositories Dispatcher is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

An action to dispatch event to multiple repositories
v1.0.2
Latest

Multiple Repositories Dispatcher is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.