Compare commits
1 Commits
user/VSlav
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
31801239f4 |
|
|
@ -1,25 +0,0 @@
|
||||||
name: Backup Data Repo
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 2 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
backup:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
|
|
||||||
- name: Create archive
|
|
||||||
run: |
|
|
||||||
tar -czf musicocr-data-repo.tgz projects campaigns manifests .gitattributes
|
|
||||||
|
|
||||||
- name: Upload archive artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: musicocr-data-repo-backup
|
|
||||||
path: musicocr-data-repo.tgz
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
name: Validate Data Repo
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
validate:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.11"
|
|
||||||
|
|
||||||
- name: Validate JSON files
|
|
||||||
run: |
|
|
||||||
python - <<'PY'
|
|
||||||
import json
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
json_files = list(Path(".").rglob("*.json"))
|
|
||||||
bad = []
|
|
||||||
for path in json_files:
|
|
||||||
try:
|
|
||||||
json.loads(path.read_text(encoding="utf-8"))
|
|
||||||
except Exception as exc:
|
|
||||||
bad.append(f"{path}: {exc}")
|
|
||||||
|
|
||||||
if bad:
|
|
||||||
raise SystemExit("Invalid JSON files:\n" + "\n".join(bad))
|
|
||||||
|
|
||||||
print(f"Validated {len(json_files)} JSON files.")
|
|
||||||
PY
|
|
||||||
|
|
||||||
- name: Check required top-level folders
|
|
||||||
run: |
|
|
||||||
test -d projects
|
|
||||||
test -d manifests
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
"schema_version": "1.0",
|
|
||||||
"users": {
|
|
||||||
"admin@example.org": {
|
|
||||||
"role": "admin",
|
|
||||||
"github_logins": ["komisla"],
|
|
||||||
"all_projects": true,
|
|
||||||
"can_create_projects": true
|
|
||||||
},
|
|
||||||
"reviewer@example.org": {
|
|
||||||
"role": "viewer",
|
|
||||||
"projects": [
|
|
||||||
{
|
|
||||||
"name": "Bach-Singet-dem-Herrn",
|
|
||||||
"access": "read"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"annotator@example.org": {
|
|
||||||
"role": "editor",
|
|
||||||
"projects": [
|
|
||||||
{
|
|
||||||
"name": "Bach-Singet-dem-Herrn",
|
|
||||||
"access": "write",
|
|
||||||
"pages": [1, 2, 3],
|
|
||||||
"sections": ["alto", "tenor"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"schema_version": "1.0",
|
|
||||||
"users": {
|
|
||||||
"local-admin": {
|
|
||||||
"role": "admin",
|
|
||||||
"github_logins": ["komisla"],
|
|
||||||
"all_projects": true,
|
|
||||||
"all_projects_access": "write",
|
|
||||||
"can_create_projects": true
|
|
||||||
},
|
|
||||||
"VSlavik1": {
|
|
||||||
"role": "editor",
|
|
||||||
"github_login": "VSlavik1",
|
|
||||||
"projects": ["Schubert-AnDieMusik-D547-hoch", "Schubert-AnDieMusik-D547-tief"],
|
|
||||||
"projects_access": "write"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -4,4 +4,4 @@
|
||||||
"projects_root": "musicocr-data/projects",
|
"projects_root": "musicocr-data/projects",
|
||||||
"campaigns_root": "campaigns",
|
"campaigns_root": "campaigns",
|
||||||
"access_control_file": "musicocr-data/manifests/access_control.json"
|
"access_control_file": "musicocr-data/manifests/access_control.json"
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue