feat: check manifests against schema (#1965)

This commit is contained in:
Alejandro R Mosteo
2026-06-22 12:47:04 +02:00
committed by GitHub
parent 9c9348816c
commit 01ec5f4179
3 changed files with 44 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
name: Check Schema
on:
pull_request:
paths:
- 'index/**.toml'
jobs:
check:
uses: ./.github/workflows/check-with-script.yml
with:
name: Schema
script: check-schema.sh
script_arg: alire/schemas/manifest-schema.yaml
setup_python: true
fetch_schema: true
+27
View File
@@ -20,11 +20,22 @@ on:
required: false
type: boolean
default: false
setup_python:
description: Whether to set up Python and install requirements.txt
required: false
type: boolean
default: false
fetch_schema:
description: Whether to clone the Alire repo (manifest JSON Schema)
required: false
type: boolean
default: false
env:
CHECKS_ORG: alire-project
CHECKS_REPO: alire-index-checks
ALR_VERSION: 2.1.1
SCHEMA_REPO: https://github.com/alire-project/alire
jobs:
check:
@@ -51,6 +62,22 @@ jobs:
with:
version: ${{env.ALR_VERSION}}
- name: Set up Python
if: inputs.setup_python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Python dependencies
if: inputs.setup_python
run: pip install -r ${{env.CHECKS_REPO}}/requirements.txt
shell: bash
- name: Fetch manifest schema
if: inputs.fetch_schema
run: git clone --depth 1 "$SCHEMA_REPO" alire
shell: bash
- name: Run check
run: >
${{env.CHECKS_REPO}}/scripts/${{inputs.script}}