opt: fix ntfy

This commit is contained in:
2025-12-30 14:02:07 +07:00
parent ec6d95ed7b
commit c3ab382adc
2 changed files with 6 additions and 6 deletions

View File

@@ -67,8 +67,8 @@ runs:
# Ntfy # Ntfy
NTFY_URL: ${{ inputs.ntfy_url || 'https://ntfy.hcmc.online' }} NTFY_URL: ${{ inputs.ntfy_url || 'https://ntfy.hcmc.online' }}
NTFY_TOPIC: ${{ inputs.ntfy_topic || 'act_runner_deployment' }} NTFY_TOPIC: ${{ inputs.ntfy_topic || 'act_runner_deployment' }}
NTFY_USER: ${{ inputs.ntfy_username || env.USER }} NTFY_USERNAME: ${{ inputs.ntfy_username || env.NTFY_USERNAME }}
NTFY_PASS: ${{ inputs.ntfy_password || env.PASS }} NTFY_PASSWORD: ${{ inputs.ntfy_password || env.NTFY_PASSWORD }}
GIT_URL: ${{ inputs.server_url || 'https://git.hcmc.online' }} GIT_URL: ${{ inputs.server_url || 'https://git.hcmc.online' }}
# Gmail # Gmail

View File

@@ -23,8 +23,8 @@ send_ntfy() {
echo -e " ${YELLOW}Debug Info:${NC}" echo -e " ${YELLOW}Debug Info:${NC}"
echo -e " NTFY_URL: ${GREEN}${NTFY_URL:-'(not set)'}${NC}" echo -e " NTFY_URL: ${GREEN}${NTFY_URL:-'(not set)'}${NC}"
echo -e " NTFY_TOPIC: ${GREEN}${NTFY_TOPIC:-'(not set)'}${NC}" echo -e " NTFY_TOPIC: ${GREEN}${NTFY_TOPIC:-'(not set)'}${NC}"
echo -e " NTFY_USERNAME: ${GREEN}${NTFY_USER:-'(not set)'}${NC}" echo -e " NTFY_USERNAME: ${GREEN}${NTFY_USERNAME:-'(not set)'}${NC}"
echo -e " NTFY_PASSWORD: ${GREEN}${NTFY_PASS:+'***set***'}${NTFY_PASS:-'(not set)'}${NC}" echo -e " NTFY_PASSWORD: ${GREEN}${NTFY_PASSWORD:+'***set***'}${NTFY_PASSWORD:-'(not set)'}${NC}"
echo "" echo ""
if [ -n "$NTFY_URL" ] && [ -n "$NTFY_TOPIC" ]; then if [ -n "$NTFY_URL" ] && [ -n "$NTFY_TOPIC" ]; then
@@ -44,8 +44,8 @@ send_ntfy() {
fi fi
# Check for Basic Auth # Check for Basic Auth
if [ -n "$NTFY_USER" ] && [ -n "$NTFY_PASS" ]; then if [ -n "$NTFY_USERNAME" ] && [ -n "$NTFY_PASSWORD" ]; then
auth_args="-u $NTFY_USER:$NTFY_PASS" auth_args="-u $NTFY_USERNAME:$NTFY_PASSWORD"
echo -e " ${GREEN}${NC} Using Basic Authentication" echo -e " ${GREEN}${NC} Using Basic Authentication"
else else
echo -e " ${YELLOW}${NC} No authentication (public topic)" echo -e " ${YELLOW}${NC} No authentication (public topic)"