Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
randilfernando committed Apr 24, 2020
0 parents commit a57a0db
Show file tree
Hide file tree
Showing 7 changed files with 29,080 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
*.iml
.idea
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Gitter notify - Github action

A [GitHub Action](https://github.com/features/actions) to send github repository dispatch event.

## Usage

You can use this action after any other action. Here is an example setup of this action:

1. Create a `.github/workflows/dispatch.yml` file in your GitHub repo.
2. Add the following code to the `dispatch.yml` file.

```yml
on: [push]

jobs:
dispatch_event:
runs-on: ubuntu-latest
name: Dispatch event

steps:
- uses: juztcode/repo-ditpatch-action@v1
with:
event-type: test_event
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: juztcode/repo-ditpatch-action
```
3. You can create github personal access token with [this](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) steps.
## Inputs
Input | Purpose
------------------|---------------------------------------------------------------------------------------------------------------------------------------
event-type | Repository dispatch event type.
token | Github personal access token (With repo scope).
repository | Repository name to send dispatch event.
client-payload | Client payload (JSON) to send with dispatch event.
21 changes: 21 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Repo Event Dispatch'
description: 'Repo Event Dispatch - Github plugin'
inputs:
event-type:
description: 'Repository dispatch event type'
required: true
token:
description: 'Github personal access token (With repo scope)'
required: true
repository:
description: 'Repository name to send dispatch event'
required: true
client-payload:
description: 'Client payload (JSON) to send with dispatch event'
required: false
runs:
using: 'node12'
main: 'dist/index.js'
branding:
icon: 'external-link'
color: 'gray-dark'
Loading

0 comments on commit a57a0db

Please sign in to comment.