79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
name: "Deploy Notification"
|
|
description: "Notify deployment result via ntfy, Gmail SMTP, and Telegram"
|
|
|
|
inputs:
|
|
status:
|
|
description: 'Deployment status (e.g., success, failure)'
|
|
required: true
|
|
title:
|
|
description: 'Notification title'
|
|
required: true
|
|
message:
|
|
description: 'Notification message body'
|
|
required: true
|
|
|
|
# Configuration
|
|
ntfy_url:
|
|
description: 'Ntfy server URL'
|
|
required: false
|
|
default: 'https://ntfy.hcmc.online'
|
|
ntfy_topic:
|
|
description: 'Ntfy topic'
|
|
required: false
|
|
default: 'act_runner_deployment'
|
|
ntfy_username:
|
|
description: 'Ntfy Basic Auth Username'
|
|
required: false
|
|
default: 'homesrv'
|
|
ntfy_password:
|
|
description: 'Ntfy Basic Auth Password'
|
|
required: false
|
|
server_url:
|
|
description: 'Git server BASE URL (e.g., https://git.hcmc.online)'
|
|
required: false
|
|
default: 'https://git.hcmc.online'
|
|
|
|
# Email Configuration
|
|
gmail_user:
|
|
description: 'Gmail username (sender)'
|
|
required: false
|
|
default: 'sitienbmt@gmail.com'
|
|
gmail_to:
|
|
description: 'Email recipient'
|
|
required: false
|
|
default: 'sitienbmt@gmail.com'
|
|
gmail_password:
|
|
description: 'Gmail App Password'
|
|
required: false
|
|
|
|
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Send notification
|
|
shell: bash
|
|
env:
|
|
# Core
|
|
STATUS: ${{ inputs.status }}
|
|
TITLE: ${{ inputs.title }}
|
|
MESSAGE: ${{ inputs.message }}
|
|
|
|
# Ntfy
|
|
NTFY_URL: ${{ inputs.ntfy_url || 'https://ntfy.hcmc.online' }}
|
|
NTFY_TOPIC: ${{ inputs.ntfy_topic || 'act_runner_deployment' }}
|
|
NTFY_USERNAME: ${{ inputs.ntfy_username || 'homesrv' }}
|
|
NTFY_PASSWORD: ${{ inputs.ntfy_password || secrets.NTFY_PASSWORD }}
|
|
GIT_URL: ${{ inputs.server_url || 'https://git.hcmc.online' }}
|
|
|
|
# Gmail
|
|
GMAIL_USER: ${{ inputs.gmail_user || 'sitienbmt@gmail.com' }}
|
|
GMAIL_TO: ${{ inputs.gmail_to || 'sitienbmt@gmail.com' }}
|
|
GMAIL_PASS: ${{ inputs.gmail_password || secrets.GMAIL_APP_PASSWORD }}
|
|
|
|
# Telegram
|
|
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
|
run: |
|
|
bash ${{ github.action_path }}/notify.sh
|