-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtrigger.yaml
More file actions
24 lines (22 loc) · 750 Bytes
/
trigger.yaml
File metadata and controls
24 lines (22 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Sample config
settings:
host: 0.0.0.0:4567
secret: "secret"
print_commands: true
capture_output: false
exit_on_error: true
events:
common: |
set -e;
PAYLOAD='{payload}'
function get_prop {
echo $(echo ${PAYLOAD} | jq $1 | tr -d '"');
}
SENDER=$(get_prop '.sender.login');
SENDER_ID=$(get_prop '.sender.id');
all: echo "This command will be executed in all the events, the current event is {event}";
push: echo "User \"${SENDER}\" with ID \"${SENDER_ID}\" pushed to this repository";
watch: |
ACTION=$(get_prop '.action');
echo "GitHub user \"${SENDER}\" with ID \"${SENDER_ID}\" ${ACTION} watching this repository";
else: echo "\"${SENDER}\" with ID \"${SENDER_ID}\" sent {event} event";