- Hourly GitHub Actions workflow - Repository stats aggregator - Code metrics scanner - Infrastructure inventory - Resume data JSON exports - Real-time updates across all BlackRoad infrastructure
77 lines
2.0 KiB
Python
Executable File
77 lines
2.0 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
Update infrastructure metrics
|
|
Aggregates data from Cloudflare, Railway, GitHub orgs
|
|
"""
|
|
|
|
import os
|
|
import json
|
|
from datetime import datetime
|
|
import requests
|
|
|
|
output = {
|
|
'data': {
|
|
'github_orgs': [
|
|
'BlackRoad-OS',
|
|
'BlackRoad-AI',
|
|
'Blackbox-Enterprises',
|
|
'BlackRoad-Labs',
|
|
'BlackRoad-Cloud',
|
|
'BlackRoad-Ventures',
|
|
'BlackRoad-Foundation',
|
|
'BlackRoad-Media',
|
|
'BlackRoad-Hardware',
|
|
'BlackRoad-Education',
|
|
'BlackRoad-Gov',
|
|
'BlackRoad-Security',
|
|
'BlackRoad-Interactive',
|
|
'BlackRoad-Archive',
|
|
'BlackRoad-Studio'
|
|
],
|
|
'total_orgs': 15,
|
|
'cloudflare_zones': 16,
|
|
'cloudflare_pages': 8,
|
|
'cloudflare_kv_namespaces': 8,
|
|
'cloudflare_d1_databases': 1,
|
|
'railway_projects': 12,
|
|
'edge_devices': {
|
|
'raspberry_pi': 3,
|
|
'total': 3
|
|
},
|
|
'domains': [
|
|
'blackroad.io',
|
|
'blackroad.systems',
|
|
'blackroad.me',
|
|
'blackroad.network',
|
|
'blackroadinc.us',
|
|
'blackroadai.com',
|
|
'blackroadqi.com',
|
|
'blackroadquantum.com',
|
|
'blackroadquantum.net',
|
|
'lucidia.earth',
|
|
'lucidia.studio',
|
|
'lucidiaqi.com',
|
|
'aliceqi.com'
|
|
]
|
|
},
|
|
'metadata': {
|
|
'updated_at': datetime.utcnow().isoformat() + 'Z',
|
|
'source': 'github-actions'
|
|
}
|
|
}
|
|
|
|
# Try to get Cloudflare data if token available
|
|
cf_token = os.getenv('CLOUDFLARE_API_TOKEN')
|
|
if cf_token:
|
|
try:
|
|
headers = {'Authorization': f'Bearer {cf_token}'}
|
|
# Add Cloudflare API calls here
|
|
pass
|
|
except Exception as e:
|
|
print(f"Cloudflare API error: {e}")
|
|
|
|
with open('infrastructure.json', 'w') as f:
|
|
json.dump(output, f, indent=2)
|
|
|
|
print("✅ Infrastructure metrics updated")
|