-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaction.yaml
108 lines (89 loc) · 2.55 KB
/
action.yaml
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
name: GitHub Actions Status Embed for Discord
author: Sebastiaan Zeeff
description: Send an enhanced GitHub Actions status embed to a Discord webhook
inputs:
workflow_name:
description: 'name of the workflow'
required: false
default: ${{ github.workflow }}
run_id:
description: 'run id of this workflow run'
required: false
default: ${{ github.run_id }}
run_number:
description: 'number of this workflow run'
required: false
default: ${{ github.run_number }}
status:
description: 'results status communicated with this embed'
required: true
repository:
description: 'GitHub repository name, including owner'
required: false
default: ${{ github.repository }}
actor:
description: 'actor that initiated the workflow run'
required: false
default: ${{ github.actor }}
ref:
description: 'The branch or tag that triggered the workflow'
required: false
default: ${{ github.ref }}
sha:
description: 'sha of the commit that triggered the workflow'
required: false
default: ${{ github.sha }}
webhook_id:
description: 'ID of the Discord webhook that is targeted'
required: true
webhook_token:
description: 'token for the Discord webhook that is targeted'
required: true
pr_author_login:
description: 'login of the PR author'
required: false
pr_number:
description: 'number of the Pull Request'
required: false
pr_title:
description: 'title of the Pull Request'
required: false
pr_source:
description: 'source of the Pull Request'
required: false
pull_request_payload:
description: 'Pull Request in jSON payload form'
required: false
debug:
description: 'Output debug logging as annotations'
required: false
default: 'false'
dry_run:
description: 'Do not send a request to the webhook endpoint'
required: false
default: 'false'
runs:
using: 'docker'
image: 'Dockerfile'
args:
# Arguments should be listed in the same order as above.
- ${{ inputs.workflow_name }}
- ${{ inputs.run_id }}
- ${{ inputs.run_number }}
- ${{ inputs.status }}
- ${{ inputs.repository }}
- ${{ inputs.actor }}
- ${{ inputs.ref }}
- ${{ inputs.sha }}
- ${{ inputs.webhook_id }}
- ${{ inputs.webhook_token }}
- ${{ inputs.pr_author_login }}
- ${{ inputs.pr_number }}
- ${{ inputs.pr_title }}
- ${{ inputs.pr_source }}
- ${{ inputs.pull_request_payload }}
- ${{ inputs.debug }}
- ${{ inputs.dry_run }}
branding:
icon: 'check-circle'
color: 'green'