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>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>
|
<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>
|
</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
@ -91,11 +91,16 @@ export default async function handler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle tag creation event
|
// 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 {
|
try {
|
||||||
const tagName = githubBody?.ref;
|
const tagName = githubBody?.ref;
|
||||||
const repository = githubBody?.repository?.name;
|
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 deploymentTitle = `Tag created: ${tagName}`;
|
||||||
const deploymentHash = githubBody?.master_branch || "";
|
const deploymentHash = githubBody?.master_branch || "";
|
||||||
|
|
||||||
@ -177,15 +182,23 @@ export default async function handler(
|
|||||||
const totalApps = apps.length + composeApps.length;
|
const totalApps = apps.length + composeApps.length;
|
||||||
|
|
||||||
if (totalApps === 0) {
|
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;
|
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;
|
return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error deploying applications on tag:", 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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user