hugoalh/send-discord-webhook-ghaction
A GitHub Action to send Discord webhook.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.1%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A GitHub Action to send Discord webhook.
Basic Info
- Host: GitHub
- Owner: hugoalh
- License: other
- Language: TypeScript
- Default Branch: main
- Homepage: https://github.com/marketplace/actions/send-discord-webhook
- Size: 19.7 MB
Statistics
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 80
Topics
Metadata Files
README.md
Send Discord Webhook (GitHub Action)
A GitHub Action to send Discord webhook.
[!IMPORTANT] - This documentation is v7.0.0 based; To view other version's documentation, please visit the versions list and select the correct version.
🌟 Features
- Support attachments/files.
- Support poll.
- Support thread.
🔰 Begin
🎯 Targets
| Targets | GitHub | |:--|:--| | GitHub Actions | ✔️ Docker |
[!NOTE] - It is possible to use this action in other methods/ways which not listed in here, however those methods/ways are not officially supported, and should beware maybe cause security issues.
#️⃣ Resources Identifier
- GitHub:
hugoalh/send-discord-webhook-ghaction[@{Tag}]
[!NOTE] - It is recommended to use this action with tag for immutability.
🛡️ GitHub Token Permissions
This action does not request any GitHub token permission.
🧩 Inputs
Almost all of the inputs are optional, but these groups of inputs must be defined:
key- One of:
content,embeds, and/orfilespoll_questionandpoll_answers
- One of:
- None
thread_idthread_nameand optionalthread_tags
| Legend | Description | |:-:|:--| | 🔐 | Should be an encrypted secret. |
key
🔐 <string> Discord webhook key; These syntaxes are acceptable:
- Webhook ID & Token:
{webhook.id}/{webhook.token} - URL:
https://discord.com/api/webhooks/{webhook.id}/{webhook.token} - URL (Legacy):
https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token}
username
<string> Override the default webhook username, maximum 80 characters; "Clyde" is not allowed.
avatar_url
<string> Override the default webhook avatar, only support URL of HTTP and HTTPS.
content
<string> Message content, maximum 2000 characters; Support Discord Markdown.
content_links_no_embed
<RegExp[]> Links' regular expressions to prevent Discord resolve and display matches links in the content as embed under the message, only support URL of HTTP and HTTPS, separate each value per line.
Examples:
- All:
.+ .pngImage:\.png(?:\?|#|$).webpImage:\.webp(?:\?|#|$)- Twitch:
twitch\.tv
embeds
<object[]> Message embed rich content, by JSON or YAML with restricted syntaxes, maximum 10 embeds, and maximum 6000 characters for summation from inputs:
embeds[*].titleembeds[*].descriptionembeds[*].footer.textembeds[*].author.nameembeds[*].fields[*].nameembeds[*].fields[*].value
embeds[*].title
<string> Message embed title, maximum 256 characters; Support Discord Markdown.
embeds[*].description
<string> Message embed description, maximum 4096 characters; Support Discord Markdown.
embeds[*].url
<string> Message embed URL.
embeds[*].timestamp
<string> Message embed timestamp, by ISO 8601 format (e.g.: "2011-11-11T11:11:11Z").
embeds[*].color
<number | string = 2105893> Message embed colour (i.e.: left border's colour of the embed); These syntaxes are acceptable:
- RGB Integer:
{number}(e.g.:2105893) - Hex:
#{hex}{hex}{hex}/#{hex}{hex}{hex}{hex}{hex}{hex}(e.g.:#0063B1) - Namespace: (e.g.:
Blue) - CSS: (e.g.:
rgb(32, 34, 37)) - Random:
Random - Special:
Discord Embed Default/#202225/rgb(32, 34, 37)
Discord Embed Background Dark/#2F3136/rgb(47, 49, 54)
Discord Blurple/#5865F2/rgb(88, 101, 242)
Discord Fuchsia/#EB459E/rgb(254, 231, 92)
Discord Green/#57F287/rgb(87, 242, 135)
Discord Red/#ED4245/rgb(237, 66, 69)
Discord Yellow/#FEE75C/rgb(254, 231, 92)
[!NOTE] - Alpha channel is not supported. - General namespace are provided by NPM package
color-name-list, list maybe change or remove without any notification, it is recommended to use value instead.
embeds[*].footer
<object> Message embed footer.
embeds[*].footer.text
<string> Message embed footer text, maximum 2048 characters; Support Discord Markdown.
embeds[*].footer.icon_url
<string> Message embed footer icon, only support URL of HTTP, HTTPS, and attachments.
embeds[*].image
<object> Message embed image.
embeds[*].image.url
<string> Message embed image URL, only support URL of HTTP, HTTPS, and attachments.
embeds[*].thumbnail
<object> Message embed thumbnail.
embeds[*].thumbnail.url
<string> Message embed thumbnail URL, only support URL of HTTP, HTTPS, and attachments.
embeds[*].author
<object> Message embed author.
embeds[*].author.name
<string> Message embed author name, maximum 256 characters.
embeds[*].author.url
<string> Message embed author URL.
embeds[*].author.icon_url
<string> Message embed author icon, only support URL of HTTP, HTTPS, and attachments.
embeds[*].fields
<object[]> Message embed fields, maximum 25 fields.
embeds[*].fields[*].name
<string> Message embed field name, maximum 256 characters; Support Discord Markdown.
embeds[*].fields[*].value
<string> Message embed field value, maximum 1024 characters; Support Discord Markdown.
embeds[*].fields[*].inline
<boolean = false> Whether the message embed field should display inline.
poll_question
<string> Message poll question, maximum 300 characters.
poll_answers
<object[]> Message poll answers, by JSON or YAML with restricted syntaxes, maximum 10 answers, and maximum 55 characters per answer text.
Poll answer can either text only, or append emoji with either custom emoji (id) or default emoji (name).
Example:
yml
- emoji: # Default
name: "🐈"
text: "Cat"
- emoji: # Default
name: "🐕"
text: "Dog"
- emoji: # Custom
id: "1"
text: "Me"
- text: "Other"
poll_duration
<number = 24> Message poll duration, by hours, maximum 32 days (i.e.: 768 hours).
poll_allow_multiselect
<boolean = false> Whether the message poll allow multiple select answers.
files
<string[]> Message attachments/files, by Glob path or literal path (select by input files_glob) under the workspace, separate each value per line, maximum 8 MB and 10 files.
files_glob
<boolean = true> Whether input files should accept Glob path instead of literal path.
allowed_mentions_parse_everyone
<boolean = true> Whether the message allowed @everyone and @here mentions.
allowed_mentions_parse_roles
<boolean = true> Whether the message allowed roles mentions.
allowed_mentions_parse_users
<boolean = true> Whether the message allowed users mentions.
allowed_mentions_roles
<string[]> Message allowed mention roles, by role ID, separate each value with comma (,) or per line, maximum 100 roles.
allowed_mentions_users
<string[]> Message allowed mention users, by user ID, separate each value with comma (,) or per line, maximum 100 users.
tts
<boolean = false> Whether the message use TTS (Text To Speech).
thread_id
<string> Message channel thread ID. When this input is defined, the message will send to the specify thread, the thread will automatically unarchive.
thread_name
<string> Forum channel thread name, maximum 100 characters. When this input is defined, the message will create a new thread with the name.
thread_tags
<string[]> Forum channel thread tags, by thread tag ID, separate each value with comma (,) or per line, maximum 5 tags.
notification
<boolean = true> Whether the message trigger push and desktop notifications.
truncate_enable
<boolean = true> Whether to try truncate firstly when inputs are too large. Truncate will not work on inputs:
truncate_ellipsis
<string = "..."> Ellipsis mark.
truncate_position
<string = "end"> Ellipsis position.
"end": At the end of the string."middle": At the middle of the string."start": At the start of the string.
wait
<boolean = true> Whether to wait for Discord confirmation of message send before response, and returns the created message body. When this input is false, a message that is not saved does not return an error.
🧩 Outputs
response
<string> Response content.
status_code
<number> Request status code.
status_ok
<boolean> Whether the request was successful.
status_text
<string> Request status text.
✍️ Examples
- Hello, world!
yml jobs: job_id: name: "Send Discord Webhook" runs-on: "ubuntu-latest" steps: - uses: "hugoalh/send-discord-webhook-ghaction@v7.0.0" with: key: "${{secrets.DISCORD_WEBHOOK_KEY}}" content: "Hello, world!" - birdie0 (from birdie0's Discord Webhooks Guide)
yml jobs: job_id: name: "Send Discord Webhook" runs-on: "ubuntu-latest" steps: - uses: "hugoalh/send-discord-webhook-ghaction@v7.0.0" with: key: "${{secrets.DISCORD_WEBHOOK_KEY}}" username: "Webhook" avatar_url: "https://i.imgur.com/4M34hi2.png" content: "Text message. Up to 2000 characters." embeds: | [ { "author": { "name": "Birdie♫", "url": "https://www.reddit.com/r/cats/", "icon_url": "https://i.imgur.com/R66g1Pe.jpg" }, "title": "Title", "url": "https://google.com/", "description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`", "color": 15258703, "fields": [ { "name": "Text", "value": "More text", "inline": true }, { "name": "Even more text", "value": "Yup", "inline": true }, { "name": "Use `\"inline\": true` parameter, if you want to display fields in the same line.", "value": "okay..." }, { "name": "Thanks!", "value": "You're welcome :wink:" } ], "thumbnail": { "url": "https://upload.wikimedia.org/wikipedia/commons/3/38/4-Nature-Wallpapers-2014-1_ukaavUI.jpg" }, "image": { "url": "https://upload.wikimedia.org/wikipedia/commons/5/5a/A_picture_from_China_every_day_108.jpg" }, "footer": { "text": "Woah! So cool! :smirk:", "icon_url": "https://i.imgur.com/fKL31aD.jpg" } } ]
📚 Guides
- Discord
- GitHub Actions
Owner
- Name: hugoalh
- Login: hugoalh
- Kind: user
- Location: Everywhere
- Company: @hugoalh-studio
- Twitter: hugoalhofficial
- Repositories: 12
- Profile: https://github.com/hugoalh
Lead of @hugoalh-studio; Full time software developer; Part time freelancer
Citation (CITATION.cff)
# yaml-language-server: $schema=https://citation-file-format.github.io/1.2.0/schema.json cff-version: "1.2.0" title: "Send Discord Webhook (GitHub Action)" message: "If you use this software, please cite it using the metadata from this file." type: "software" authors: - name: "hugoalh" repository-code: "https://github.com/hugoalh/send-discord-webhook-ghaction" keywords: - "discord" - "gh-action" - "ghaction" - "github-action" - "webhook" license: "MIT"
GitHub Events
Total
- Create event: 46
- Issues event: 1
- Release event: 4
- Watch event: 1
- Delete event: 37
- Issue comment event: 32
- Push event: 87
- Pull request review event: 4
- Pull request event: 73
Last Year
- Create event: 46
- Issues event: 1
- Release event: 4
- Watch event: 1
- Delete event: 37
- Issue comment event: 32
- Push event: 87
- Pull request review event: 4
- Pull request event: 73
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| hugoalh | 3****h | 575 |
| dependabot[bot] | 4****] | 141 |
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 5
- Total pull requests: 323
- Average time to close issues: 5 months
- Average time to close pull requests: 7 days
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 1.6
- Average comments per pull request: 1.18
- Merged pull requests: 56
- Bot issues: 0
- Bot pull requests: 322
Past Year
- Issues: 1
- Pull requests: 60
- Average time to close issues: 2 months
- Average time to close pull requests: 4 days
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.62
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 60
Top Authors
Issue Authors
- juraj-hrivnak (2)
- hugoalh (2)
- rbrtbrnschn (1)
Pull Request Authors
- dependabot[bot] (402)
- hugoalh (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 17
- Total versions: 84
github actions: hugoalh/send-discord-webhook-ghaction
Send Discord webhook.
- Homepage: https://github.com/marketplace/actions/send-discord-webhook
- License: other
-
Latest release: v7.0.5
published 11 months ago
Rankings
Dependencies
- @actions/core 1.8.2
- @actions/http-client 2.0.1
- @hugoalh/advanced-determine 7.0.1
- @hugoalh/more-method 0.7.0
- @hugoalh/repattern 0.6.0
- @hugoalh/undefinish 1.0.9
- ajv 8.11.0
- ajv-formats 3.0.0-rc.0
- ajv-formats-draft2019 1.6.1
- ansi-regex 6.0.1
- asynckit 0.4.0
- char-regex 2.0.1
- combined-stream 1.0.8
- commander 2.20.3
- data-uri-to-buffer 4.0.0
- delayed-stream 1.0.0
- discontinuous-range 1.0.0
- emoji-regex 10.1.0
- extend 3.0.2
- fast-deep-equal 3.1.3
- fetch-blob 3.1.5
- form-data 4.0.0
- formdata-polyfill 4.0.10
- is-fullwidth-code-point 4.0.0
- json-schema-traverse 1.0.0
- mime-db 1.52.0
- mime-types 2.1.35
- moo 0.5.1
- nearley 2.20.1
- node-domexception 1.0.0
- node-fetch 3.2.4
- punycode 2.1.1
- railroad-diagrams 1.0.0
- randexp 0.4.6
- require-from-string 2.0.2
- ret 0.1.15
- schemes 1.4.0
- smtp-address-parser 1.0.10
- tunnel 0.0.6
- uri-js 4.4.1
- web-streams-polyfill 3.2.1
- yaml 2.1.0
- @actions/core ^1.8.2
- @hugoalh/advanced-determine ^7.0.1
- @hugoalh/more-method ^0.7.0
- ajv ^8.10.0
- ajv-formats ^3.0.0-rc.0
- ajv-formats-draft2019 ^1.6.1
- form-data ^4.0.0
- node-fetch ^3.2.4
- yaml ^2.1.0
- hugoalh/send-discord-webhook-ghaction main composite
- actions/checkout v3.1.0 composite
- hugoalh/scan-virus-ghaction v0.6.4 composite
- dist/main.js node16 javascript
- hugoalh/send-discord-webhook-ghaction main composite