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.
Find a file
2026-03-03 09:35:24 +00:00
action.yml Actualiser action.yml 2026-03-03 09:30:46 +00:00
LICENSE Ajouter LICENSE 2026-03-03 08:14:41 +00:00
README.md Actualiser README.md 2026-03-03 09:35:24 +00:00

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:

  1. Create an Application in the Gotify web UI.
  2. Copy the Application Token and set it as a Forgejo secret (GOTIFY_TOKEN).
  3. Use the public URL of your Gotify server (gotify_url) in your workflow.

Youll 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:

  1. Fork the repository
  2. Make your changes
  3. Open a Pull Request

Lets make Docker Swarm deployments easier and more reliable with Forgejo Actions! 🎯