53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: "Deploy Notification"
|
|
description: "Notify deployment result via ntfy and Gmail SMTP"
|
|
|
|
inputs:
|
|
status:
|
|
description: "Deployment status (success | failure)"
|
|
required: true
|
|
|
|
title:
|
|
description: "Notification title"
|
|
required: true
|
|
|
|
message:
|
|
description: "Notification message"
|
|
required: true
|
|
|
|
ntfy_url:
|
|
description: "ntfy server URL (e.g. https://ntfy.example.com)"
|
|
default: "https://ntfy.hcmc.online"
|
|
required: false
|
|
|
|
ntfy_topic:
|
|
description: "ntfy topic"
|
|
default: "deploy"
|
|
required: false
|
|
|
|
gmail_user:
|
|
description: "Gmail address"
|
|
default: "sitienbmt@gmail.com"
|
|
required: false
|
|
|
|
gmail_to:
|
|
description: "Recipient email"
|
|
default: "sitienbmt@gmail.com"
|
|
required: false
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Send notification
|
|
shell: bash
|
|
env:
|
|
STATUS: ${{ inputs.status }}
|
|
TITLE: ${{ inputs.title }}
|
|
MESSAGE: ${{ inputs.message }}
|
|
NTFY_URL: ${{ inputs.ntfy_url }}
|
|
NTFY_TOPIC: ${{ inputs.ntfy_topic }}
|
|
GMAIL_USER: ${{ inputs.gmail_user }}
|
|
GMAIL_TO: ${{ inputs.gmail_to }}
|
|
GMAIL_PASS: ${{ secrets.GMAIL_APP_PASSWORD }}
|
|
run: |
|
|
bash ${{ github.action_path }}/notify.sh
|