From 9dd761bc8eea973d038b6624fdc0118f11ef4522 Mon Sep 17 00:00:00 2001 From: "AB from home.homenet" Date: Tue, 16 Sep 2025 16:13:26 +0300 Subject: [PATCH] Added wiki generator --- .gitea/workflows/authentik-apps.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/authentik-apps.yaml b/.gitea/workflows/authentik-apps.yaml index e218032..313741f 100644 --- a/.gitea/workflows/authentik-apps.yaml +++ b/.gitea/workflows/authentik-apps.yaml @@ -66,7 +66,7 @@ jobs: echo "🔍 Validating and extracting JSON..." if python3 -c "import json; f=open('terraform-output.json'); data=json.load(f); f.close(); print('✅ Valid JSON')" 2>/dev/null; then # Extract just the value field using Python (more reliable than jq) - python3 -c " + cat > extract_value.py << 'EOF' import json with open('terraform-output.json', 'r') as f: data = json.load(f) @@ -77,13 +77,14 @@ with open('terraform-output.json', 'r') as f: value = data with open('terraform-output-value.json', 'w') as out: json.dump(value, out, indent=2) -" +EOF + python3 extract_value.py mv terraform-output-value.json terraform-output.json echo "✅ JSON extracted successfully" else echo "❌ Invalid JSON detected, trying to fix..." # Try to extract valid JSON part - python3 -c " + cat > fix_json.py << 'EOF' import json import re @@ -121,7 +122,8 @@ try: print('❌ No JSON found in output') except Exception as e: print(f'❌ Failed to fix JSON: {e}') -" +EOF + python3 fix_json.py fi # Debug output