-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.16 KB
/
registry.yml
File metadata and controls
47 lines (40 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 "github-actions@github.com"
git add magic/manifest.json
git commit -m "chore(manifest): update after new .magic"
git push
else
echo "No changes to commit."
fi