Spaces:
Paused
Paused
fix: CI auto-import reads from zip (staging dir cleaned by bundle_output)
Browse filesCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
.github/workflows/register-outlook.yml
CHANGED
|
@@ -75,20 +75,20 @@ jobs:
|
|
| 75 |
echo "OUTLOOK2API_URL or ADMIN_PASSWORD not set, skipping import"
|
| 76 |
exit 0
|
| 77 |
fi
|
| 78 |
-
# Extract accounts from
|
| 79 |
-
ACCOUNTS="
|
| 80 |
-
|
| 81 |
-
ACCOUNTS=$(python -c "
|
| 82 |
-
import json, glob
|
| 83 |
accs = []
|
| 84 |
-
for
|
| 85 |
try:
|
| 86 |
-
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
| 88 |
except: pass
|
| 89 |
print(json.dumps(accs))
|
| 90 |
")
|
| 91 |
-
fi
|
| 92 |
if [ "$ACCOUNTS" = "[]" ]; then
|
| 93 |
echo "No accounts to import"
|
| 94 |
exit 0
|
|
|
|
| 75 |
echo "OUTLOOK2API_URL or ADMIN_PASSWORD not set, skipping import"
|
| 76 |
exit 0
|
| 77 |
fi
|
| 78 |
+
# Extract accounts from the generated zip file
|
| 79 |
+
ACCOUNTS=$(python -c "
|
| 80 |
+
import json, glob, zipfile
|
|
|
|
|
|
|
| 81 |
accs = []
|
| 82 |
+
for zf in glob.glob('output/*Outlook.zip'):
|
| 83 |
try:
|
| 84 |
+
with zipfile.ZipFile(zf) as z:
|
| 85 |
+
data = z.read('accounts.txt').decode().strip()
|
| 86 |
+
for line in data.splitlines():
|
| 87 |
+
if ':' in line:
|
| 88 |
+
accs.append(line.strip())
|
| 89 |
except: pass
|
| 90 |
print(json.dumps(accs))
|
| 91 |
")
|
|
|
|
| 92 |
if [ "$ACCOUNTS" = "[]" ]; then
|
| 93 |
echo "No accounts to import"
|
| 94 |
exit 0
|