Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cstuder/apprise-ga
GitHub Action to send a dynamic push notification to every single platform thanks to the Apprise library
https://github.com/cstuder/apprise-ga
apprise email github-actions hacktoberfest jinja2 notification notifications push-notifications
Last synced: 4 months ago
JSON representation
GitHub Action to send a dynamic push notification to every single platform thanks to the Apprise library
- Host: GitHub
- URL: https://github.com/cstuder/apprise-ga
- Owner: cstuder
- License: mit
- Created: 2019-04-16T13:50:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-16T16:22:46.000Z (over 1 year ago)
- Last Synced: 2024-09-22T01:15:43.305Z (5 months ago)
- Topics: apprise, email, github-actions, hacktoberfest, jinja2, notification, notifications, push-notifications
- Language: Shell
- Homepage: https://github.com/marketplace/actions/apprise-push-notifications
- Size: 30.3 KB
- Stars: 21
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# apprise-ga
GitHub Action to send a dynamic push notification to every single platform thanks to the [Apprise library](https://github.com/caronc/apprise)
Supports services like Slack, AWS SNS, Discord, IFTTT, Matrix, Microsoft Teams, Telegram, Twitter etc., as well as email and webhooks.
Supports dynamically adding event data to the notification message with Jinja2 templates.
## Example usage
```yaml
uses: cstuder/apprise-ga@master
with:
title: "Notification title"
message: "Message"
env:
APPRISE_URL: ${{ secrets.APPRISE_URL }}
```## Complete usage
1. Create a new action in your workflow which uses `cstuder/apprise-ga@master`. (Or a tagged version.)
1. Look up the syntax for your push notification URL in the list of [Supported Notifications](https://github.com/caronc/apprise#supported-notifications) by Apprise. (I.e. `protocol://user:password@hostname/channel`)
1. Create a [repository secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) named `APPRISE_URL` with your URL as content.
1. Add your message as inputs `title` or `message`.### Inserting event data with templates
For both title and message you can use the [Jinja2](http://jinja.pocoo.org) syntax to insert data from the event trigger (`/github/workflow/event.json`) into your notification.
Find the event data in the list of [GitHub webhook payloads](https://developer.github.com/v3/activity/events/types/).
#### Templating example
For a push event, you might use the following arguments:
```yaml
title: "Push received on {{ ref }}"
message: "Commit by {{ head_commit.author.name }}: {{ head_commit.message | truncate(128) }} ({{ head_commit.id[0:7] }})"
```## Inputs
### `title`
**Required** String with notification title.
### `message`
**Required** String with notification message.
## Secrets
### `APPRISE_URL`
**Required** Notification URL(s) according to the [Apprise documentation](https://github.com/caronc/apprise#supported-notifications).
To notify mulitple URLs, add them separated by spaces.
## License
MIT.