mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
fcb8a2bded
commit
e5ee06b67e
@ -396,7 +396,8 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p>
|
||||
Choose when to trigger deployments: on push to the selected branch or when a new tag is created.
|
||||
Choose when to trigger deployments: on push to the
|
||||
selected branch or when a new tag is created.
|
||||
</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
|
@ -91,11 +91,16 @@ export default async function handler(
|
||||
}
|
||||
|
||||
// Handle tag creation event
|
||||
if (req.headers["x-github-event"] === "create" && githubBody?.ref_type === "tag") {
|
||||
if (
|
||||
req.headers["x-github-event"] === "create" &&
|
||||
githubBody?.ref_type === "tag"
|
||||
) {
|
||||
try {
|
||||
const tagName = githubBody?.ref;
|
||||
const repository = githubBody?.repository?.name;
|
||||
const owner = githubBody?.repository?.owner?.name || githubBody?.repository?.owner?.login;
|
||||
const owner =
|
||||
githubBody?.repository?.owner?.name ||
|
||||
githubBody?.repository?.owner?.login;
|
||||
const deploymentTitle = `Tag created: ${tagName}`;
|
||||
const deploymentHash = githubBody?.master_branch || "";
|
||||
|
||||
@ -175,17 +180,25 @@ export default async function handler(
|
||||
}
|
||||
|
||||
const totalApps = apps.length + composeApps.length;
|
||||
|
||||
|
||||
if (totalApps === 0) {
|
||||
res.status(200).json({ message: "No apps configured to deploy on tag" });
|
||||
res
|
||||
.status(200)
|
||||
.json({ message: "No apps configured to deploy on tag" });
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(200).json({ message: `Deployed ${totalApps} apps based on tag ${tagName}` });
|
||||
|
||||
res
|
||||
.status(200)
|
||||
.json({
|
||||
message: `Deployed ${totalApps} apps based on tag ${tagName}`,
|
||||
});
|
||||
return;
|
||||
} catch (error) {
|
||||
console.error("Error deploying applications on tag:", error);
|
||||
res.status(400).json({ message: "Error deploying applications on tag", error });
|
||||
res
|
||||
.status(400)
|
||||
.json({ message: "Error deploying applications on tag", error });
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user