feat: initial release #1
@@ -12,8 +12,4 @@ jobs:
|
|||||||
- name: Validate JSON, using a valid file
|
- name: Validate JSON, using a valid file
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
json-file: test/valid.json
|
json-file: renovate.json
|
||||||
- name: Validate JSON, using an invalid file
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
json-file: test/invalid.json
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ runs:
|
|||||||
- name: Extract schema
|
- name: Extract schema
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Extracting schema from ${{ inputs.json-file }}"
|
|
||||||
schema=$(jq -r '.["$schema"]' < ${{ inputs.json-file }})
|
schema=$(jq -r '.["$schema"]' < ${{ inputs.json-file }})
|
||||||
if [ -n "$schema" ]; then
|
if [ -n "$schema" ]; then
|
||||||
curl -s $schema > schema.json
|
curl -s $schema > schema.json
|
||||||
@@ -24,10 +23,8 @@ runs:
|
|||||||
- name: Update the schema to the latest version
|
- name: Update the schema to the latest version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Updating schema to the latest version"
|
|
||||||
npx ajv-cli migrate -s schema.json -o schema.json
|
npx ajv-cli migrate -s schema.json -o schema.json
|
||||||
- name: Validate JSON
|
- name: Validate JSON
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Validating JSON"
|
|
||||||
npx ajv-cli validate -s schema.json -d ${{ inputs.json-file }} --strict=false
|
npx ajv-cli validate -s schema.json -d ${{ inputs.json-file }} --strict=false
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"invalid": "invalid"
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user