mirror of
https://github.com/WebBreacher/WhatsMyName.git
synced 2025-06-18 14:25:31 -04:00
32 lines
796 B
YAML
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
|