Skip to content

Commit 02b349d

Browse files
committed
feat: #228 add extra worker
1 parent 32f3bfa commit 02b349d

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Diff for: .github/workflows/release-please.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ jobs:
8383
workers:
8484
- name: main
8585
dockerImage: ghcr.io/ptah-sh/ptah-server:${{ needs.release-please.outputs.tag_name }}
86-
- name: scheduler
86+
- name: schedule_root
87+
dockerImage: ghcr.io/ptah-sh/ptah-server:${{ needs.release-please.outputs.tag_name }}
88+
- name: schedule_run
8789
dockerImage: ghcr.io/ptah-sh/ptah-server:${{ needs.release-please.outputs.tag_name }}
8890
- name: queue
8991
dockerImage: ghcr.io/ptah-sh/ptah-server:${{ needs.release-please.outputs.tag_name }}

Diff for: app/Models/DeploymentData/Process.php

+6
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ public function copyWith(array $attributes): static
307307

308308
if (isset($attributes['workers'])) {
309309
foreach ($attributes['workers'] as $idx => $worker) {
310+
if (! isset($worker['name'])) {
311+
$errors["workers.{$idx}.name"] = 'Worker name is required';
312+
313+
continue;
314+
}
315+
310316
if (! $this->findWorkerByName($worker['name'])) {
311317
$errors["workers.{$idx}.name"] = 'Worker '.$worker['name'].' does not exist';
312318
}

Diff for: app/Policies/ServicePolicy.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ public function forceDelete(User $user, Service $service): bool
6565

6666
public function deploy(User $user, Service $service): bool
6767
{
68-
return $user->belongsToTeam($service->team) && $service->team->hasValidSubscription();
68+
return $user->belongsToTeam($service->team) && ($service->team->hasValidSubscription() || $service->team->onTrial());
6969
}
7070
}

0 commit comments

Comments
 (0)