$this->registryDockerAuthScript->forBuild($registry, 'root'), 'runtime' => $this->registryDockerAuthScript->forRuntime($registry, 'root'), default => throw new InvalidArgumentException('Registry auth scope must be build or runtime.'), }; $operation = $server->operations()->create([ 'kind' => OperationKind::CREDENTIAL_ROTATION, 'status' => OperationStatus::PENDING, ]); $operation->steps()->create([ 'name' => 'Configure '.$scope.' registry auth', 'order' => 1, 'status' => OperationStatus::PENDING, 'script' => $auth['script'], 'secrets' => $auth['secrets'], ]); return $operation->refresh(); } }