Phase 4: service registry — index.json + 4 service manifests
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
name: Validate Manifests
|
||||
on:
|
||||
push:
|
||||
branches: ['**']
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Validate index.json
|
||||
run: python3 -c "import json; json.load(open('index.json'))"
|
||||
- name: Validate all manifests
|
||||
run: |
|
||||
for f in services/*/manifest.json; do
|
||||
echo "Validating $f"
|
||||
python3 -c "
|
||||
import json, sys
|
||||
m = json.load(open('$f'))
|
||||
required = ['id','name','version','author','image','container_name']
|
||||
missing = [k for k in required if k not in m]
|
||||
if missing:
|
||||
print(f'MISSING: {missing}'); sys.exit(1)
|
||||
print('OK')
|
||||
"
|
||||
done
|
||||
Reference in New Issue
Block a user