mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 16:17:10 +00:00
feat: auto-deploy
This commit is contained in:
1 parent
c659683d92
commit
c41bc8dac2
3 files changed
+20
-11
No files matched your search
+12
-10
@@ -95,16 +95,18 @@ Route::post('/source/github/events', function () {
|
||||
}
|
||||
$applications = Application::where('project_id', $id)->where('git_branch', $branch)->get();
|
||||
foreach ($applications as $application) {
|
||||
GithubEventsApplications::create([
|
||||
"delivery_guid" => $x_github_delivery,
|
||||
"application_id" => $application->id
|
||||
]);
|
||||
$deployment_uuid = new Cuid2(7);
|
||||
dispatch(new DeployApplicationJob(
|
||||
deployment_uuid: $deployment_uuid,
|
||||
application_uuid: $application->uuid,
|
||||
force_rebuild: false,
|
||||
));
|
||||
if ($application->isDeployable()) {
|
||||
GithubEventsApplications::create([
|
||||
"delivery_guid" => $x_github_delivery,
|
||||
"application_id" => $application->id
|
||||
]);
|
||||
$deployment_uuid = new Cuid2(7);
|
||||
dispatch(new DeployApplicationJob(
|
||||
deployment_uuid: $deployment_uuid,
|
||||
application_uuid: $application->uuid,
|
||||
force_rebuild: false,
|
||||
));
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return generalErrorHandler($e);
|
||||
|
||||
Reference in new issue
Block a user