2019-11-10 00:40:01 +00:00
2019-11-08 10:37:57 +09:00
2019-11-08 10:37:57 +09:00
2019-11-08 10:37:57 +09:00
2019-11-08 10:37:57 +09:00
2019-11-08 10:37:57 +09:00
2019-11-08 10:12:38 +09:00
2019-11-08 10:37:57 +09:00
2019-11-08 10:37:57 +09:00
2019-11-10 00:35:15 +00:00

Repository Dispatch

GitHub Marketplace

A GitHub action to create a repository dispatch event.

Usage

      - name: Repository Dispatch
        uses: peter-evans/repository-dispatch@v1.0.0
        with:
          token: ${{ secrets.REPO_ACCESS_TOKEN }}
          event-type: my-event

Parameters

  • token (required) - A repo scoped GitHub Personal Access Token.
  • repository - The full name of the repository to send the dispatch. Defaults to the current repository.
  • event-type (required) - A custom webhook event name.
  • client-payload - JSON payload with extra information about the webhook event that your action or worklow may use. Default: {}

Example

Here is an example setting all of the input parameters.

      - name: Repository Dispatch
        uses: peter-evans/repository-dispatch@v1.0.0
        with:
          token: ${{ secrets.REPO_ACCESS_TOKEN }}
          repository: username/my-repo
          event-type: my-event
          client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

Here is an example on: repository_dispatch workflow to receive the event.

name: Repository Dispatch
on:
  repository_dispatch:
    types: [my-event]
jobs:
  autopep8:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
        with:
          ref: ${{ github.event.client_payload.ref }}
      - run: echo ${{ github.event.client_payload.sha }}

License

MIT

Languages
TypeScript 84.4%
JavaScript 15.6%