aboutsummaryrefslogtreecommitdiffstats
path: root/builds.sr.ht/triggers.md
blob: 0fb31484896c4a5ef5c30410ebb723cc7a807f85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: Build triggers reference
---

At the end of a job or a job group, you can execute triggers based on the
outcome of the job.

```
triggers:
  - 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:

## email

Sends an email summarizing the build results.

*Configuration*

- **to**: The value of the "To" header in the outgoing email, e.g. your email
    address or e.g. `Jim Jimson <jim@example.org>, Bob Bobson
    <bob@example.org>`. Required.
- **cc**: The value of the "Cc" header in the outgoing email. Optional.
- **in_reply_to**: The value of the "In-Reply-To" header in the outgoing email.
    Optional.

## 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

## others?

Patches welcome!