job status step
This commit is contained in:
16
action.yml
16
action.yml
@@ -17,6 +17,7 @@ inputs:
|
|||||||
description: "Message ID to delete"
|
description: "Message ID to delete"
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
|
||||||
chat_id:
|
chat_id:
|
||||||
description: "Chat ID"
|
description: "Chat ID"
|
||||||
required: true
|
required: true
|
||||||
@@ -56,3 +57,18 @@ runs:
|
|||||||
if: inputs.delete != ''
|
if: inputs.delete != ''
|
||||||
run: deleteMessage "${{ inputs.bot_token }}" ${{ inputs.chat_id }} ${{ inputs.delete }}
|
run: deleteMessage "${{ inputs.bot_token }}" ${{ inputs.chat_id }} ${{ inputs.delete }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Send job status
|
||||||
|
if: inputs.status != ''
|
||||||
|
run: |
|
||||||
|
if [[ "${{ job.status }}" == "success" ]]; then
|
||||||
|
STATUS="✅"
|
||||||
|
elif [[ "${{ job.status }}" == "failure" ]]; then
|
||||||
|
STATUS="❌"
|
||||||
|
elif [[ "${{ job.status }}" == "cancelled" ]]; then
|
||||||
|
STATUS="⚠️"
|
||||||
|
else
|
||||||
|
STATUS="❓"
|
||||||
|
fi
|
||||||
|
sendMessage "${{ inputs.bot_token }}" ${{ inputs.chat_id }} "$STATUS ${{ inputs.status }}"
|
||||||
|
shell: bash
|
||||||
Reference in New Issue
Block a user