aboutsummaryrefslogtreecommitdiffstats
path: root/builds.sr.ht/triggers.md
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-27 09:54:15 -0400
committerDrew DeVault <sir@cmpwn.com>2018-10-27 09:54:31 -0400
commit03440ab00fead4312e7ac17b5b1b549262a9efcc (patch)
tree00e6c43617be31ad6a367bf09716345bf36643e0 /builds.sr.ht/triggers.md
parent827d816a44e3f965284714f32005f764c3e207b7 (diff)
downloadsr.ht-docs-03440ab00fead4312e7ac17b5b1b549262a9efcc.tar.gz
Document build triggers
Diffstat (limited to 'builds.sr.ht/triggers.md')
-rw-r--r--builds.sr.ht/triggers.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/builds.sr.ht/triggers.md b/builds.sr.ht/triggers.md
new file mode 100644
index 0000000..09a7aff
--- /dev/null
+++ b/builds.sr.ht/triggers.md
@@ -0,0 +1,25 @@
+At the end of a job or a job group, you can execute triggers based on the
+outcome of the job. The basic format is (in YAML or JSON):
+
+ {
+ "action": "trigger type",
+ "condition": "when to execute this trigger",
+ [...action-specific configuration...]
+ }
+
+Condition may be one of the following:
+
+- **always**: execute the trigger after every build
+- **failure**: execute the trigger after a failed build
+- **success**: execute the trigger after a successful build
+
+The following actions are available:
+
+## webhook
+
+Submits the job status (as it would be returned by GET /api/jobs/:id) as a POST
+request to a specified URL.
+
+*Configuration*
+
+- **url**: The URL to submit the HTTP request to