-
Notifications
You must be signed in to change notification settings - Fork 0
Trigger a webhook on deployment events #23
Copy link
Copy link
Open
Description
Add the following option in NixOS module :
services.pullix = {
enable = true;
hostname = "my_nas";
pollIntervalSecs = 60;
flakeRepo = {
type = "GitHub";
repo = "scarisey/nixos-dotfiles";
prodSpec = {
ref = "my_nas/prod";
};
testSpec = {
ref = "my_nas/test";
};
};
environmentFile = config.sops.secrets."my_nas/nix_config_pullix".path; #set a PAT env var here for this example
verbose_logs = false;
otelHttpEndpoint = "http://localhost:4318/v1/metrics";
webhooks = {
onTestSucceeded = {
url = "https://api.github.com/repos/OWNER/REPO/actions/workflows/mon-workflow.yml/dispatches";
headers = [
"Authorization: Bearer <PAT>" #<ENV_VAR> should be the way to substitute an env var with pullix at runtime
"Accept: application/vnd.github+json"
];
data = """
{"ref": "main", "inputs": {"environment": "prod"}}
""";
};
onProdSucceeded = #...
onTestFailed = #...
onProdFailed = #...
};
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels