diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4d7fbb7b7a..a87f1e574f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,9 @@ -name: "Build and Publish" +name: "Build and Publish Appwrite Images for Cloud" on: push: tags: - - appwrite-* + - cl-* jobs: build-publish: @@ -16,7 +16,7 @@ jobs: with: fetch-depth: 2 submodules: recursive - ref: feat-db-pools-master + ref: master - name: Login to Docker Hub uses: docker/login-action@v2 diff --git a/app/workers/builds.php b/app/workers/builds.php index 89aa22edb7..fb71dadcf5 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -112,6 +112,8 @@ class BuildsV1 extends Worker $isNewBuild = empty($buildId); + $deviceFunctions = $this->getFunctionsDevice($project->getId()); + if ($isNewBuild) { $buildId = ID::unique(); $build = $dbForProject->createDocument('builds', new Document([ @@ -124,7 +126,7 @@ class BuildsV1 extends Worker 'path' => '', 'runtime' => $function->getAttribute('runtime'), 'source' => $deployment->getAttribute('path', ''), - 'sourceType' => strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)), + 'sourceType' => strtolower($deviceFunctions->getType()), 'logs' => '', 'endTime' => null, 'duration' => 0, @@ -254,8 +256,6 @@ class BuildsV1 extends Worker Console::execute('tar --exclude code.tar.gz -czf ' . $tmpPathFile . ' -C /tmp/builds/' . \escapeshellcmd($buildId) . '/code' . (empty($rootDirectory) ? '' : '/' . $rootDirectory) . ' .', '', $stdout, $stderr); - $deviceFunctions = $this->getFunctionsDevice($project->getId()); - $localDevice = new Local(); $buffer = $localDevice->read($tmpPathFile); $mimeType = $localDevice->getFileMimeType($tmpPathFile); diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 36f6ad0dc5..5fb4cffbd2 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -70,7 +70,7 @@ class Executor array $variables = [], string $command = null, ) { - $runtimeId = "$projectId-$deploymentId"; + $runtimeId = "$projectId-$deploymentId-build"; $route = "/runtimes"; $params = [ 'runtimeId' => $runtimeId,