/
slack.yml
112 lines (100 loc) · 2.69 KB
/
slack.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
username: GitHub-CI
icon_url: https://octodex.github.com/images/femalecodertocat.png
pretext: Triggered via {{eventName}} by {{actor}} {{default action "action"}} {{ref}} `{{diffRef}}`
title: GitHub Actions
title_link: https://support.github.com
text: |
*<{{workflowRunUrl}}|Workflow _{{workflow}}_ job _{{jobName}}_ triggered by _{{eventName}}_ is _{{jobStatus}}_>* for <{{refUrl}}|`{{ref}}`>
{{#if description}}<{{diffUrl}}|`{{diffRef}}`> - {{{description}}}{{/if}}
{{#if payload.commits}}
*Commits*
{{#each payload.commits}}
<{{this.url}}|`{{truncate this.id 8}}`> - {{this.message}}
{{/each}}
{{/if}}
fallback: |-
[GitHub] {{workflow}} #{{runNumber}} {{jobName}} is {{jobStatus}}
fields:
- title: Job Steps
value: "{{#each jobSteps}}{{icon this.outcome}} {{@key}}\n{{/each}}"
short: false
- title: Workflow
value: "<{{{workflowUrl}}}|{{workflow}}>"
short: true
- title: Git Ref
value: "{{ref}} ({{refType}})"
short: true
- title: Run ID
value: |-
<{{workflowRunUrl}}|{{runId}}>
short: true
- title: Run Number
value: "{{runNumber}}"
short: true
- title: Actor
value: "{{actor}}"
short: true
- title: Job Status
value: "{{jobStatus}}"
short: true
blocks:
# author
- type: context
elements:
- type: image
image_url: '{{sender.html_url}}'
alt_text: '{{sender.login}}'
- type: mrkdwn
text: "*<{{sender.html_url}}|{{sender.login}}>*"
# title
- type: section
text:
type: mrkdwn
text: |
*<{{title_link}}|{{title}}>*
# text
- type: section
text:
type: mrkdwn
text: *text
# fields
- type: section
fields:
- type: mrkdwn
text: |-
*Job Steps*
{{#each jobSteps}}{{#ifneq this.outcome 'skipped'}}{{icon this.outcome}} {{@key}}
{{/ifneq}}{{/each}}
- type: mrkdwn
text: "*Workflow*\n<{{{workflowUrl}}}|{{workflow}}>"
- type: mrkdwn
text: "*Git Ref*\n{{ref}} ({{refType}})"
- type: mrkdwn
text: |-
*Run ID*
<{{workflowRunUrl}}|{{runId}}>
- type: mrkdwn
text: "*Run Number*\n{{runNumber}}"
- type: mrkdwn
text: "*Actor*\n{{actor}}"
# footer
- type: context
elements:
- type: image
image_url: '{{footer_icon}}'
alt_text: satterly
- type: mrkdwn
text: '{{{footer}}} | <!date^{{ts}}^{date_short_pretty} at {time}|{{ts}}>'
footer: >-
<{{repositoryUrl}}|{{repositoryName}}> {{workflow}} #{{runNumber}}
colors:
success: '#5DADE2'
failure: '#884EA0'
cancelled: '#A569BD'
default: '#7D3C98'
icons:
success: ':white_check_mark:'
failure: ':grimacing:'
cancelled: ':x:'
skipped: ':heavy_minus_sign:'
default: ':interrobang:'