Skip to content

feat: improve magic file processing and clean up registry entries #5

feat: improve magic file processing and clean up registry entries

feat: improve magic file processing and clean up registry entries #5

Workflow file for this run

name: Update model registry
on:
push:
paths:
- "magic/upload/*.magic"
- "scripts/update_registry.py"
- ".github/workflows/registry.yml"
branches:
- main
permissions:
contents: write
jobs:
build-registry:
runs-on: ubuntu-latest
env:
DEFAULT_BRANCH: main
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install deps (none needed)
run: python -V
- name: Update manifest.json
run: python scripts/update_registry.py
- name: Commit manifest.json if changed
run: |
if [[ -n "$(git status --porcelain magic/manifest.json)" ]]; then
git config user.name "github-actions[bot]"
git config user.email "[email protected]"
git add magic/manifest.json
git commit -m "chore(manifest): update after new .magic"
git push
else
echo "No changes to commit."
fi