No description
  • Rust 84.6%
  • Nix 15.4%
Find a file
2024-12-26 00:41:18 +01:00
.github/workflows flake reorg 2024-12-14 19:27:27 +01:00
nix flake reorg 2024-12-14 19:27:27 +01:00
src rate limited and cache controll attempt 2024-12-26 00:41:18 +01:00
.dockerignore docker setup 2021-01-07 21:01:46 +01:00
.envrc flake 2022-07-17 13:01:44 +02:00
.gitignore flake 2022-07-17 13:01:44 +02:00
Cargo.lock rate limited and cache controll attempt 2024-12-26 00:41:18 +01:00
Cargo.toml rate limited and cache controll attempt 2024-12-26 00:41:18 +01:00
docker.nix flake reorg 2024-12-14 19:27:27 +01:00
flake.lock flake reorg 2024-12-14 19:27:27 +01:00
flake.nix flake reorg 2024-12-14 19:27:27 +01:00
LICENSE add license info 2024-01-09 22:02:31 +01:00
README.md flake reorg 2024-12-14 19:27:27 +01:00

rss-webhook-trigger

Trigger webhooks from rss/atom feeds.

Send a POST request to a webhook every time an rss/atom feed changes.

Note that this will only detect changes made while the program is running, it is not able to detect changes made to the feeds on program start.

Configuration

interval = 600 # optional, defaults to 30 minutes

[[feed]]
feed = "https://example.com/feed1.xml"
hook = "https://hook.example.com/hook1/call"

[[feed]]
feed = "https://example.com/feed2.xml"
hook = "https://hook.example.com/hook2/call"
headers = { authorization = "...." }
body = { event_type = "build" }

# you can load header values from external files to keep your screts separate
[[feed]]
feed = "https://example.com/feed3.xml"
hook = "https://hook.example.com/hook3/call"
headers = { authorization = "/run/secrets/hook-auth" }
body = { event_type = "build" }

# trigger on docker hub updates instead of rss feed update
[[feed]]
feed = "docker-hub://matrixdotorg/synapse"
hook = "https://hook.example.com/hook2/call"

Usage in NixOS

A NixOS module is included and can be used like this:

{
  inputs.rss-webhook-trigger.url = "github:icewind1991/rss-webhook-trigger";

  outputs = { self, nixpkgs, rss-webhook-trigger }: {
    nixosConfigurations.my-machine = nixpkgs.lib.nixosSystem {
      modules =
        [
          rss-webhook-trigger.nixosModules.default
          {
            services.rss-webhook-trigger = {
              enable = true;
              hooks = [
                {
                  feed = "https://example.com/feed1.xml";
                  hook = "https://hook.example.com/hook1/call";
                }
              ];
            };
          }
          # ... other configuration ...
        ];
    };
  };
}