Skip to content

Merge pull request #11 from MLT-OSS/fix/data-quality-and-tooling #4

Merge pull request #11 from MLT-OSS/fix/data-quality-and-tooling

Merge pull request #11 from MLT-OSS/fix/data-quality-and-tooling #4

name: Update Indexes
on:
push:
branches:
- main
paths:
- "firstdata/sources/**/*.json"
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: uv sync
- name: Validate all source JSON files
run: |
find firstdata/sources -name "*.json" | xargs uv run check-jsonschema \
--schemafile firstdata/schemas/datasource-schema.json
- name: Check for duplicate IDs
run: uv run python scripts/check_ids.py
- name: Rebuild indexes
run: uv run python scripts/build_indexes.py
- name: Commit updated indexes
run: |
git config user.name "firstdata[bot]"
git config user.email "firstdata@mininglamp.com"
git add firstdata/indexes/ assets/badges/
git diff --cached --quiet || git commit -m "chore(indexes): auto-update indexes"
git push