6bf2c1355a
CD / Release (push) Successful in 5s
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-node](https://github.com/actions/setup-node) | action | minor | `v6.3.0` → `v6.4.0` | --- ### Release Notes <details> <summary>actions/setup-node (actions/setup-node)</summary> ### [`v6.4.0`](https://github.com/actions/setup-node/releases/tag/v6.4.0) [Compare Source](https://github.com/actions/setup-node/compare/v6.3.0...v6.4.0) #### What's Changed ##### Dependency updates: - Upgrade [@​actions](https://github.com/actions) dependencies by [@​Copilot](https://github.com/Copilot) in [#​1525](https://github.com/actions/setup-node/pull/1525) - Update Node.js versions in versions.yml and bump package to v6.4.0 by [@​priya-kinthali](https://github.com/priya-kinthali) in [#​1533](https://github.com/actions/setup-node/pull/1533) #### New Contributors - [@​Copilot](https://github.com/Copilot) made their first contribution in [#​1525](https://github.com/actions/setup-node/pull/1525) **Full Changelog**: <https://github.com/actions/setup-node/compare/v6...v6.4.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41LjQiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImFjdGlvbiIsImRlcHMiXX0=--> Reviewed-on: #39 Reviewed-by: t.behrendt <t.behrendt@noreply.localhost> Co-authored-by: Renovate Bot <renovate@t00n.de> Co-committed-by: Renovate Bot <renovate@t00n.de>
34 lines
950 B
YAML
34 lines
950 B
YAML
name: "Validate JSON by JSON Schema"
|
|
description: "Validates JSON files using their $schema reference"
|
|
author: "Timo Behrendt <t.behrendt@t00n.de>"
|
|
|
|
inputs:
|
|
json-file:
|
|
description: "The JSON file to validate"
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "latest"
|
|
- name: Extract schema
|
|
shell: bash
|
|
run: |
|
|
schema=$(jq -r '.["$schema"]' < ${{ inputs.json-file }})
|
|
if [ -n "$schema" ]; then
|
|
curl -s $schema > schema.json
|
|
else
|
|
echo "No schema found"
|
|
exit 0
|
|
fi
|
|
- name: Update the schema to the latest version
|
|
shell: bash
|
|
run: |
|
|
npx ajv-cli migrate -s schema.json -o schema.json
|
|
- name: Validate JSON
|
|
shell: bash
|
|
run: |
|
|
npx ajv-cli validate -s schema.json -d ${{ inputs.json-file }} --strict=false
|