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