From 8c20c833ba825cdf8d67b1abc440eaea8c06a96d Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 27 Dec 2023 13:06:59 +0100 Subject: [PATCH] fix: add source commit to final envs --- app/Jobs/ApplicationDeploymentJob.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 68e57244f..cb0b11679 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -1129,6 +1129,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted // Add PORT if not exists, use the first port as default if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('PORT'))->isEmpty()) { $environment_variables->push("PORT={$ports[0]}"); + } if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('SOURCE_COMMIT'))->isEmpty()) { + if (!is_null($this->commit)) { + $environment_variables->push("SOURCE_COMMIT={$this->commit}"); + } } return $environment_variables->all(); }