From ff6d3f336a022f828885b510e5d05dd9b2500f74 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 5 Jan 2024 20:39:41 +0100 Subject: [PATCH] Slightly improve regex to check for valid image versions (#168) --- src/build.schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/build.schema.json b/src/build.schema.json index 5e2974a..ba1bbbb 100644 --- a/src/build.schema.json +++ b/src/build.schema.json @@ -15,27 +15,27 @@ "properties": { "aarch64": { "default": "homeassistant/aarch64-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" }, "amd64": { "default": "homeassistant/amd64-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" }, "armhf": { "default": "homeassistant/armhf-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" }, "armv7": { "default": "homeassistant/armv7-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" }, "i386": { "default": "homeassistant/i386-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" } },