From c76a1b1ba58d3c666887b3df7f07b331252f167d Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 12 Sep 2023 13:10:39 +0200 Subject: [PATCH] fix: webhooks should not run if server is not functional --- routes/webhooks.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routes/webhooks.php b/routes/webhooks.php index 6a9de6403..c3c80dba3 100644 --- a/routes/webhooks.php +++ b/routes/webhooks.php @@ -119,6 +119,11 @@ return response('Nothing to do. No applications found.'); } foreach ($applications as $application) { + $isFunctional = $application->destination->server->isFunctional(); + if (!$isFunctional) { + ray('Server is not functional: ' . $application->destination->server->name); + continue; + } if ($x_github_event === 'push') { if ($application->isDeployable()) { ray('Deploying ' . $application->name . ' with branch ' . $branch);