diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 577704e..2eaf9a8 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -36,9 +36,8 @@ jobs: pattern: "\\.json$" env: BASE: "domains/" - # NOTE: wait for wildcard support - # - name: Validate JSON Schema - # uses: docker://orrosenblatt/validate-json-action:latest - # env: - # INPUT_SCHEMA: "schema.json" - # INPUT_JSONS: "domains/*" + - name: Validate action.yml against a remote schema + uses: cardinalby/schema-validator-action@v3 + with: + file: 'domains/*.json' + schema: 'schema.json' diff --git a/schema.json b/schema.json index e553c41..b5166a5 100644 --- a/schema.json +++ b/schema.json @@ -1,4 +1,5 @@ { + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "description": { @@ -11,11 +12,17 @@ "type": "string" } }, - "required": ["username"] + "required": ["username"], + "additionalProperties": { + "type": "string" + } }, "record": { "type": "object", "properties": { + "ALIAS": { + "type": "string" + }, "A": { "type": "array", "items": { @@ -67,7 +74,9 @@ } } }, + "required": [], "anyOf": [ + { "required": ["ALIAS"] }, { "required": ["A"] }, { "required": ["AAAA"] }, { "required": ["CNAME"] }, @@ -80,5 +89,5 @@ "type": "boolean" } }, - "required": ["owner", "record", "proxied"] + "required": ["owner", "record"] }