From a0720ae213776437e26148cf33bc85f58e39eb0a Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Fri, 28 Nov 2025 17:36:03 +0100 Subject: [PATCH] feat(registries): allow for anonymous LSCR/TrueForge and move TrueForge to default to Quay backend --- app/registries/providers/lscr/Lscr.js | 11 +++++++---- .../providers/trueforge/trueforge.js | 19 +++++++++++++------ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/registries/providers/lscr/Lscr.js b/app/registries/providers/lscr/Lscr.js index 056519a7..9778e37a 100644 --- a/app/registries/providers/lscr/Lscr.js +++ b/app/registries/providers/lscr/Lscr.js @@ -5,10 +5,13 @@ const Ghcr = require('../ghcr/Ghcr'); */ class Lscr extends Ghcr { getConfigurationSchema() { - return this.joi.object().keys({ - username: this.joi.string().required(), - token: this.joi.string().required(), - }); + return this.joi.alternatives([ + this.joi.string().allow(''), + this.joi.object().keys({ + username: this.joi.string().required(), + token: this.joi.string().required(), + }), + ]); } /** diff --git a/app/registries/providers/trueforge/trueforge.js b/app/registries/providers/trueforge/trueforge.js index 239e7c2a..c742fb69 100644 --- a/app/registries/providers/trueforge/trueforge.js +++ b/app/registries/providers/trueforge/trueforge.js @@ -1,14 +1,21 @@ -const Ghcr = require('../ghcr/Ghcr'); +const Quay = require('../quay/Quay'); /** * Linux-Server Container Registry integration. */ -class Trueforge extends Ghcr { +class Trueforge extends Quay { getConfigurationSchema() { - return this.joi.object().keys({ - username: this.joi.string().required(), - token: this.joi.string().required(), - }); + return this.joi.alternatives([ + // Anonymous configuration + this.joi.string().allow(''), + + // Auth configuration + this.joi.object().keys({ + namespace: this.joi.string().required(), + account: this.joi.string().required(), + token: this.joi.string().required(), + }), + ]); } /**