job status step
This commit is contained in:
16
action.yml
16
action.yml
@@ -17,6 +17,7 @@ inputs:
|
||||
description: "Message ID to delete"
|
||||
required: false
|
||||
default: ''
|
||||
|
||||
chat_id:
|
||||
description: "Chat ID"
|
||||
required: true
|
||||
@@ -56,3 +57,18 @@ runs:
|
||||
if: inputs.delete != ''
|
||||
run: deleteMessage "${{ inputs.bot_token }}" ${{ inputs.chat_id }} ${{ inputs.delete }}
|
||||
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