feat: deploy key based deployments
This commit is contained in:
@@ -14,8 +14,8 @@ use Spatie\Url\Url;
|
||||
|
||||
class PublicGitRepository extends Component
|
||||
{
|
||||
public string $public_repository_url;
|
||||
public int $port;
|
||||
public string $repository_url;
|
||||
public int $port = 3000;
|
||||
public string $type;
|
||||
public $parameters;
|
||||
|
||||
@@ -31,7 +31,7 @@ class PublicGitRepository extends Component
|
||||
public null|string $publish_directory = null;
|
||||
|
||||
protected $rules = [
|
||||
'public_repository_url' => 'required|url',
|
||||
'repository_url' => 'required|url',
|
||||
'port' => 'required|numeric',
|
||||
'is_static' => 'required|boolean',
|
||||
'publish_directory' => 'nullable|string',
|
||||
@@ -39,7 +39,7 @@ class PublicGitRepository extends Component
|
||||
public function mount()
|
||||
{
|
||||
if (config('app.env') === 'local') {
|
||||
$this->public_repository_url = 'https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify';
|
||||
$this->repository_url = 'https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify';
|
||||
$this->port = 3000;
|
||||
}
|
||||
$this->parameters = getParameters();
|
||||
@@ -73,7 +73,7 @@ class PublicGitRepository extends Component
|
||||
public function submit()
|
||||
{
|
||||
$this->validate();
|
||||
$url = Url::fromString($this->public_repository_url);
|
||||
$url = Url::fromString($this->repository_url);
|
||||
$git_host = $url->getHost();
|
||||
$git_repository = $url->getSegment(1) . '/' . $url->getSegment(2);
|
||||
$git_branch = $url->getSegment(4) ?? 'main';
|
||||
|
||||
Reference in New Issue
Block a user