| action.yml | ||
| LICENSE | ||
| README.md | ||
gotify-notification-action
A simple Forgejo Action to send push notifications via Gotify — a self-hosted open-source push notification server. Use this action to notify your Gotify clients (mobile, desktop, etc.) about build status, deployment events, workflow results, or any other CI/CD event.
Gotify provides a REST API to send messages with a title, body, and optional priority directly to your own server instance.([gotify.net][2])
Features
- 💬 Send push notifications from Forgejo Actions to your own Gotify server
- 🚀 Support for success and failure notifications
- 🔐 Uses Forgejo secrets for secure token and URL configuration
- 📦 Easy to plug into any workflow
Usage
Example Workflow
Create or update a .forgejo/workflows/notify.yml file:
name: CI with Gotify Notification
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Run your build/test steps here
- name: Build
run: echo "Building…"
# Notify success
- name: Notify Success
uses: https://forge.jeckel.fr/forgejo/gotify-notification-action@v1.1
with:
gotify_token: ${{ secrets.GOTIFY_TOKEN }}
gotify_url: https://gotify.my-instance.com
# Notify failure (optional)
- name: Notify Failure
if: failure()
uses: https://forge.jeckel.fr/forgejo/gotify-notification-action@v1.1
with:
gotify_token: ${{ secrets.GOTIFY_TOKEN }}
gotify_url: https://gotify.my-instance.com
notify_failure: true
Inputs
| Input | Required | Description |
|---|---|---|
gotify_url |
✅ | The full URL to your Gotify server (e.g. https://gotify.example.com) |
gotify_token |
✅ | The Gotify application token used to authenticate API requests |
notify_failure |
○ | Whether this notification marks a failure (true or false) |
⚠️ The action reads the Forgejo Secrets you configure (such as GOTIFY_TOKEN) to authenticate with your Gotify instance.
Gotify Setup
Gotify is a self-hosted notification server that you can deploy easily (for example via Docker). Once your server is running:
- Create an Application in the Gotify web UI.
- Copy the Application Token and set it as a Forgejo secret (
GOTIFY_TOKEN). - Use the public URL of your Gotify server (
gotify_url) in your workflow.
You’ll then receive push notifications on any logged-in clients when the action runs.
📝 License
This repository follows the MIT License (see LICENSE file).
🙌 Contributing
Contributions, issues, and feature requests are welcome.
To contribute:
- Fork the repository
- Make your changes
- Open a Pull Request
Let’s make Docker Swarm deployments easier and more reliable with Forgejo Actions! 🎯