Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crec0/announce-n-crosspost
Send a message in announcement channel and crosspost it.
https://github.com/crec0/announce-n-crosspost
Last synced: about 1 month ago
JSON representation
Send a message in announcement channel and crosspost it.
- Host: GitHub
- URL: https://github.com/crec0/announce-n-crosspost
- Owner: Crec0
- License: mit
- Created: 2022-04-23T21:26:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-05T07:57:14.000Z (over 2 years ago)
- Last Synced: 2024-09-16T23:08:58.992Z (about 2 months ago)
- Language: JavaScript
- Size: 120 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# announce-n-crosspost
Simple action which sends a message over to discord news channel and crossposts it.
## Inputs
| Input name | Description | Required | Default Value |
|------------|---------------------------------------------------------------------------------------------------------------------------|----------|---------------|
| bot-token | Discord bot token. This bot should have the `SEND_MESSAGES` permission in the news channel you want to send message in. | `true` | `N/A` |
| channel | A string being the channel id of the news channel you want to post the message in. Channel **MUST** be a news channel. | `true` | `N/A` |
| content | The message content which should be sent. | `true` | `N/A` |# Outputs
| Output name | Description |
|-------------|-----------------------------------------|
| message-id | Id of the messages sent in news channel |## Example Job
```yaml
Publish-To-Discord:
runs-on: ubuntu-latest
steps:
- name: Publish
id: publish-to-discord
uses: Crec0/announce-n-crosspost@v1
with:
bot-token: ${{ secrets.DISCORD_BOT_TOKEN }}
channel: ${{ secrets.CHANNEL_ID }}
content: |
**${{ github.event.release.name }}** has been released!
${{ github.event.release.body }}
Get it on Github Releases: <${{ github.event.release.html_url }}>- name: Print message id
run: echo "Message id = ${{ steps.publish-to-discord.outputs.message-id }}"
```