-
Notifications
You must be signed in to change notification settings - Fork 0
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
Arael D. Espinosa
committed
Feb 3, 2023
0 parents
commit 52da597
Showing
23 changed files
with
14,331 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,2 @@ | ||
INPUT_MESSAGE= | ||
INPUT_WEBHOOK= |
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,17 @@ | ||
name: Notification on push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Discord notifications | ||
uses: cl8dep/action-discord@main | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
message: A new commit has been pushed to cl8dep/action-discord. |
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 @@ | ||
node_modules | ||
.env |
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,53 @@ | ||
# 🚀 Discord for GitHub Actions | ||
|
||
[![Build Status][build-badge]][build-url] | ||
|
||
Sends a Discord notification message. Simple as that. | ||
Supports all [workflow event types](https://developer.github.com/webhooks/#events) by using the [Discord GitHub webhooks](https://discordapp.com/developers/docs/resources/webhook#execute-githubcompatible-webhook). | ||
|
||
*Appearance on Discord :* | ||
|
||
![Discord message](docs/preview.png "Discord message") | ||
|
||
<!-- This GitHub action is part of a list of Actions that are located in an other repo. Feel free to check it out : https://github.com/Ilshidur/actions. --> | ||
|
||
## Usage | ||
|
||
```yaml | ||
- name: Discord notification | ||
uses: cl8dep/action-discord@v0 | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
message: 'Hello World' | ||
``` | ||
### Arguments | ||
By default, the GitHub action will send a notificaction with the event informations. Providing the arguments will override the message. | ||
### Arguments | ||
* **`webhook`** (**required**): the Discord webhook URL (see https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks). | ||
* **`message`** (*required*): the message to send. | ||
* **`username`** (*optional*): overrides the bot nickname. | ||
* **`avatar`** (*optional*): overrides the avatar URL. | ||
<!-- * **`DISCORD_EMBEDS`** (*optional*): This should be a valid JSON string of an array of Discord `embed` objects. See the [documentation on Discord WebHook Embeds](https://birdie0.github.io/discord-webhooks-guide/structure/embeds.html) for more information. You can use set it to `${{ toJson(my_value) }}` using [`toJson()`](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#tojson) if your input is an object value. --> | ||
That's all. | ||
|
||
## Alternatives | ||
|
||
Because open source is about everyone : | ||
|
||
https://github.com/marketplace/actions/discord-message-notify <br/> | ||
![](https://img.shields.io/github/stars/appleboy/discord-action.svg?label=Stars&style=social) | ||
|
||
|
||
<hr/> | ||
|
||
<p align="center"> | ||
Don't forget to 🌟 Star 🌟 the repo if you like this GitHub Action !<br/> | ||
<a href="https://github.com/Ilshidur/action-discord/issues/new">Your feedback is appreciated</a> | ||
</p> | ||
|
||
[build-badge]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FIlshidur%2Faction-discord%2Fbadge&style=flat | ||
[build-url]: https://actions-badge.atrox.dev/Ilshidur/action-discord/goto |
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,23 @@ | ||
name: 'Discord notifications' | ||
description: 'Send a message to Discord chanel' | ||
branding: | ||
icon: message-square | ||
color: blue | ||
inputs: | ||
webhook: | ||
description: 'The Webhook URL used to access to Discord chanel' | ||
required: true | ||
message: | ||
description: 'The message' | ||
required: true | ||
username: | ||
description: 'Username' | ||
required: false | ||
default: 'Github' | ||
avatar: | ||
description: 'Bot avatar' | ||
required: false | ||
default: 'https://avatars.githubusercontent.com/u/9919?s=280&v=4' | ||
runs: | ||
using: 'node16' | ||
main: './dist/index.js' |
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,6 @@ | ||
module.exports = { | ||
presets: [ | ||
['@babel/preset-env', {targets: {node: 'current'}}], | ||
'@babel/preset-typescript', | ||
], | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Oops, something went wrong.