-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
45 lines (45 loc) · 1.54 KB
/
action.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
name: 'Telegram Manual Approval'
description: 'Allows for manual approval of workflows via Telegram within chat.'
branding:
icon: pause
color: blue
inputs:
TELEGRAM_KEY:
description: 'Telegram Bot key'
required: true
TELEGRAM_CHAT_ID:
description: 'Telegram chat ID to send message'
required: true
UPDATE_REQUESTS:
description: 'Limit of updates (1 ~ 1 sec)'
required: false
default: "60"
APPROVAL_TEXT:
description: 'Text of message'
required: false
default: 'Please approve deployment:'
APPROVAL_BUTTON:
description: 'Text of approval button'
required: false
default: 'Approve'
REJECT_BUTTON:
description: 'Text of rejection button'
required: false
default: 'Reject'
APPROVED_TEXT:
description: 'Text of successful approved'
required: false
default: 'Approved!'
REJECTED_TEXT:
description: 'Text of successful rejected'
required: false
default: 'Rejected!'
TIMEOUT_TEXT:
description: 'Text of timeout'
required: false
default: 'Timeout!'
runs:
using: "composite"
steps:
- run: $GITHUB_ACTION_PATH/main.sh --TELEGRAM_KEY ${{ inputs.TELEGRAM_KEY }} --TELEGRAM_CHAT_ID ${{ inputs.TELEGRAM_CHAT_ID }} --UPDATE_REQUESTS ${{ inputs.UPDATE_REQUESTS }} --APPROVAL_TEXT "${{ inputs.APPROVAL_TEXT }}" --APPROVAL_BUTTON "${{ inputs.APPROVAL_BUTTON }}" --REJECT_BUTTON "${{ inputs.REJECT_BUTTON }}" --APPROVED_TEXT "${{ inputs.APPROVED_TEXT }}" --REJECTED_TEXT "${{ inputs.REJECTED_TEXT }}" --TIMEOUT_TEXT "${{ inputs.TIMEOUT_TEXT }}"
shell: bash