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(), + }), + ]); } /**