send button only on success
This commit is contained in:
@@ -67,13 +67,16 @@ runs:
|
||||
|
||||
- name: Send message
|
||||
run: |
|
||||
button_url=${{ inputs.button_url }}
|
||||
STATUS=${{ inputs.status }}
|
||||
if [[ "$STATUS" == "success" ]]; then
|
||||
STATUS="✅"
|
||||
elif [[ "$STATUS" == "failure" ]]; then
|
||||
STATUS="❌"
|
||||
button_url=""
|
||||
elif [[ "$STATUS" == "cancelled" ]]; then
|
||||
STATUS="⚠️"
|
||||
button_url=""
|
||||
fi
|
||||
if [[ "$STATUS" != '' ]]; then
|
||||
STATUS="$STATUS "
|
||||
@@ -82,7 +85,7 @@ runs:
|
||||
CAPTION="$STATUS${{ inputs.caption }}"
|
||||
echo $CAPTION
|
||||
echo "$CAPTION${{ inputs.message }}"
|
||||
sendMessage "${{ inputs.bot_token }}" ${{ inputs.chat_id }} "$CAPTION${{ inputs.message }}" "${{ inputs.button_title }}" "${{ inputs.button_url }}"
|
||||
sendMessage "${{ inputs.bot_token }}" ${{ inputs.chat_id }} "$CAPTION${{ inputs.message }}" "${{ inputs.button_title }}" "$button_url"
|
||||
shell: bash
|
||||
|
||||
- name: Delete message
|
||||
|
||||
Reference in New Issue
Block a user