WhatsMyName/.github/workflows/sort-format-json.yml
2025-06-02 23:41:25 +03:00

32 lines
796 B
YAML

name: Sort and Format JSON Files
on:
push:
paths:
- 'wmn-data.json'
- 'wmn-data-schema.json'
jobs:
sort-and-format-json:
name: Sort and Format JSON Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Run Python sorting script
run: python scripts/sort_format_json.py
- name: Commit if changed
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git add wmn-data.json wmn-data-schema.json
git diff --cached --quiet || git commit -m "chore: auto-sort and format JSON files"
git push