mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-27 07:22:17 +00:00
feat(notification): add ntfy notifications
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
sendDiscordNotification,
|
||||
sendEmailNotification,
|
||||
sendGotifyNotification,
|
||||
sendNtfyNotification,
|
||||
sendSlackNotification,
|
||||
sendTelegramNotification,
|
||||
} from "./utils";
|
||||
@@ -42,11 +43,12 @@ export const sendBuildErrorNotifications = async ({
|
||||
telegram: true,
|
||||
slack: true,
|
||||
gotify: true,
|
||||
ntfy: true,
|
||||
},
|
||||
});
|
||||
|
||||
for (const notification of notificationList) {
|
||||
const { email, discord, telegram, slack, gotify } = notification;
|
||||
const { email, discord, telegram, slack, gotify, ntfy } = notification;
|
||||
if (email) {
|
||||
const template = await renderAsync(
|
||||
BuildFailedEmail({
|
||||
@@ -132,6 +134,20 @@ export const sendBuildErrorNotifications = async ({
|
||||
);
|
||||
}
|
||||
|
||||
if (ntfy) {
|
||||
await sendNtfyNotification(
|
||||
ntfy,
|
||||
"Build Failed",
|
||||
"warning",
|
||||
`view, Build details, ${buildLink}, clear=true;`,
|
||||
`🛠️Project: ${projectName}\n` +
|
||||
`⚙️Application: ${applicationName}\n` +
|
||||
`❔Type: ${applicationType}\n` +
|
||||
`🕒Date: ${date.toLocaleString()}\n` +
|
||||
`⚠️Error:\n${errorMessage}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (telegram) {
|
||||
const inlineButton = [
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user