-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
493 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: test | ||
on: [push] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Notification test | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Text only | ||
uses: ./ | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
text: ${{ github.run_id }} (1/8) Alert message | ||
|
||
- name: Full fields | ||
uses: ./ | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
title: Alert title | ||
text: ${{ github.run_id }} (2/8) Alert message | ||
priority: highest | ||
level: success | ||
|
||
- name: Verbose | ||
uses: ./ | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
verbose: ${{ github.run_id }} (3/8) Verbose message | ||
|
||
- name: Info | ||
uses: ./ | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
info: ${{ github.run_id }} (4/8) Info message | ||
|
||
- name: Notice | ||
uses: ./ | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
notice: ${{ github.run_id }} (5/8) Notice message | ||
|
||
- name: Success | ||
uses: ./ | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
success: ${{ github.run_id }} (6/8) Success message | ||
|
||
- name: Warning | ||
uses: ./ | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
warning: ${{ github.run_id }} (7/8) Warning message | ||
|
||
- name: Error | ||
uses: ./ | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
error: ${{ github.run_id }} (8/8) Error message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea | ||
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Notify.Events for GitHub Action | ||
|
||
[GitHub Action](https://github.com/features/actions) for sending a notification message for [30+ messengers and other services](https://notify.events#sRecipients). | ||
|
||
[![Actions Status](https://github.com/notify-events/github-action/workflows/test/badge.svg)](https://github.com/notify-events/github-action/actions) | ||
[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/notify-events/github-action/blob/master/LICENSEs) | ||
|
||
## Usage | ||
|
||
Send custom message | ||
|
||
```yaml | ||
name: notify.events message | ||
on: [push] | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: send custom message | ||
uses: notify-events/github-action@main | ||
with: | ||
token: ${{ secrets.NE_CHANNEL_TOKEN }} | ||
text: This is message | ||
``` | ||
## Input variables | ||
* token - (**required**) Notify.Events channel token | ||
* title - Message title | ||
* text - (**required**) Message text (allow simple html tags: \<b>, \<i>, \<br>, \<a href="...">) | ||
* priority - Message priority (highest, high, normal, low, lowest) | ||
* level - Message level (verbose, info, notice, warning, error, success) | ||
```yaml | ||
uses: notify-events/github-action@main | ||
with: | ||
token: ${{ secrets.NE_CHANNEL_TOKEN }} | ||
title: Build success | ||
text: Build ${{ github.ref }} successfully | ||
priority: info | ||
level: success | ||
``` | ||
### Predefined simple message: | ||
* verbose - Message text with 'verbose' level and 'lowest' priority | ||
* info - Message text with 'info' level and 'low' priority | ||
* notice - Message text with 'notice' level and 'low' priority | ||
* success - Message text with 'success' level and 'normal' priority | ||
* warning - Message text with 'warning' level and 'high' priority | ||
* error - Message text with 'error' level and 'highest' priority | ||
```yaml | ||
uses: notify-events/github-action@main | ||
with: | ||
token: $(( secrets.NE_CHANNEL_TOKEN }} | ||
success: Build {{ github.ref }} successfully | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Notify.Events | ||
author: Notify.Events | ||
description: Sending message to 30+ messangers | ||
|
||
inputs: | ||
|
||
token: | ||
description: | | ||
Notify.Events channel token | ||
required: true | ||
|
||
title: | ||
description: | | ||
Message title | ||
required: false | ||
|
||
text: | ||
description: | | ||
Message Text (allowed simple html tags: <b>, <i>, <br>, <a href="">) | ||
required: false | ||
|
||
priority: | ||
description: | | ||
Message priority (highest, high, normal, low, lowest) | ||
required: false | ||
|
||
level: | ||
description: | | ||
Message Level (verbose, info, notice, warning, error, success) | ||
required: false | ||
|
||
verbose: | ||
description: | | ||
Message text with 'verbose' level and 'lowest' priority | ||
required: false | ||
|
||
info: | ||
description: | | ||
Message text with 'info' level and 'low' priority | ||
required: false | ||
|
||
notice: | ||
description: | | ||
Message text with 'notice' level and 'low' priority | ||
required: false | ||
|
||
success: | ||
description: | | ||
Message text with 'success' level and 'normal' priority | ||
required: false | ||
|
||
warning: | ||
description: | | ||
Message text with 'warning' level and 'high' priority | ||
required: false | ||
|
||
error: | ||
description: | | ||
Message text with 'error' level and 'highest' priority | ||
required: false | ||
|
||
runs: | ||
using: node12 | ||
main: dist/index.js | ||
|
||
branding: | ||
icon: message-circle | ||
color: red |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "github-action", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "ncc build -m src/index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/notify-events/github-action.git" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/notify-events/github-action/issues" | ||
}, | ||
"homepage": "https://github.com/notify-events/github-action#readme", | ||
"dependencies": { | ||
"@actions/core": "^1.4.0", | ||
"@actions/github": "^5.0.0", | ||
"node-fetch": "^2.6.1" | ||
} | ||
} |
Oops, something went wrong.