diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx index 6f2219ee0..e1fa90bff 100644 --- a/apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx +++ b/apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx @@ -392,8 +392,8 @@ export const SaveGithubProvider = ({ applicationId }: Props) => { control={form.control} name="triggerType" render={({ field }) => ( - -
+ +
Trigger Type diff --git a/apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx b/apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx index 6e9b0a033..f4fe86618 100644 --- a/apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx +++ b/apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx @@ -40,7 +40,7 @@ import { import { cn } from "@/lib/utils"; import { api } from "@/utils/api"; import { zodResolver } from "@hookform/resolvers/zod"; -import { CheckIcon, ChevronsUpDown, X } from "lucide-react"; +import { CheckIcon, ChevronsUpDown, HelpCircle, X } from "lucide-react"; import Link from "next/link"; import { useEffect } from "react"; import { useForm } from "react-hook-form"; @@ -58,6 +58,7 @@ const GithubProviderSchema = z.object({ branch: z.string().min(1, "Branch is required"), githubId: z.string().min(1, "Github Provider is required"), watchPaths: z.array(z.string()).optional(), + triggerType: z.enum(["push", "tag"]).default("push"), enableSubmodules: z.boolean().default(false), }); @@ -84,6 +85,7 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => { githubId: "", branch: "", watchPaths: [], + triggerType: "push", enableSubmodules: false, }, resolver: zodResolver(GithubProviderSchema), @@ -128,6 +130,7 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => { composePath: data.composePath, githubId: data.githubId || "", watchPaths: data.watchPaths || [], + triggerType: data.triggerType || "push", enableSubmodules: data.enableSubmodules ?? false, }); } @@ -145,6 +148,7 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => { composeStatus: "idle", watchPaths: data.watchPaths, enableSubmodules: data.enableSubmodules, + triggerType: data.triggerType, }) .then(async () => { toast.success("Service Provided Saved"); @@ -387,6 +391,46 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => { )} /> + ( + +
+ Trigger Type + + + + + + +

+ Choose when to trigger deployments: on push to the + selected branch or when a new tag is created. +

+
+
+
+
+ + +
+ )} + />