mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
fix: support host storage paths and clean up cancelled deployments
Allow validated host file and directory mounts outside resource directories while protecting external paths from deletion. Clean up cancelled deployment containers and clear tracked process IDs. Preserve legacy KeyDB and Dragonfly password parsing, accept server backup paths without extension restrictions, and allow Compose variable proxy ports.
This commit is contained in:
1 parent
774e6bf178
commit
554bd354bf
94 files changed
+2922
-357
No files matched your search
@@ -95,10 +95,6 @@ class Github extends Controller
|
||||
default => $base_branch,
|
||||
};
|
||||
$failure_key = $this->manualWebhookFailureRateLimitKey($request, 'github', $full_name, $matched_branch);
|
||||
if ($this->hasTooManyManualWebhookFailures($failure_key)) {
|
||||
return $this->tooManyManualWebhookFailuresResponse($failure_key);
|
||||
}
|
||||
|
||||
// A redelivery of the same signed payload is one guess.
|
||||
$failure_attempt = $this->manualWebhookSignedPayloadAttempt($request, $x_hub_signature_256);
|
||||
$applications = Application::query();
|
||||
@@ -276,6 +272,11 @@ class Github extends Controller
|
||||
if ($jobId <= 0) {
|
||||
return response('Nothing to do. No workflow job found.');
|
||||
}
|
||||
// A public App can be installed by other accounts; only its own installation may use the runners.
|
||||
$installationId = data_get($payload, 'installation.id');
|
||||
if (blank($githubApp->installation_id) || ! is_numeric($installationId) || (int) $installationId !== (int) $githubApp->installation_id) {
|
||||
return response('Nothing to do. The job belongs to another installation of the GitHub App.');
|
||||
}
|
||||
|
||||
$jobDetails = array_filter([
|
||||
'workflow_job_id' => $jobId,
|
||||
@@ -294,13 +295,15 @@ class Github extends Controller
|
||||
if ($matchingConfigs->isEmpty()) {
|
||||
return response('Nothing to do. No runner configuration matches the job labels.');
|
||||
}
|
||||
if (! $matchingConfigs->contains('allow_pull_requests', true) && $this->isPullRequestWorkflowJob($githubApp, $payload)) {
|
||||
$isPullRequest = $matchingConfigs->contains(fn (GithubRunnerConfig $config) => ! $config->allow_pull_requests)
|
||||
&& $this->isPullRequestWorkflowJob($githubApp, $payload);
|
||||
if ($isPullRequest && ! $matchingConfigs->contains('allow_pull_requests', true)) {
|
||||
return response('Nothing to do. The runner configuration does not allow pull request jobs.');
|
||||
}
|
||||
|
||||
$execution = GithubRunnerExecution::createOrFirst(
|
||||
['github_app_id' => $githubApp->id, 'trigger_workflow_job_id' => $jobId],
|
||||
[...$jobDetails, 'labels' => $labels, 'status' => GithubRunnerStatus::Queued, 'queued_at' => now()],
|
||||
[...$jobDetails, 'labels' => $labels, 'is_pull_request' => $isPullRequest, 'status' => GithubRunnerStatus::Queued, 'queued_at' => now()],
|
||||
);
|
||||
if ($execution->wasRecentlyCreated) {
|
||||
ProvisionGithubRunnerJob::dispatch($execution->id);
|
||||
|
||||
Reference in new issue
Block a user