From 91401cf49af78bbb3ad743fc0abae9d386969745 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Sun, 19 Oct 2025 07:27:01 -0400 Subject: [PATCH] .env formatting. --- .gitea/workflows/auto-pr-tofu-plan.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/auto-pr-tofu-plan.yml b/.gitea/workflows/auto-pr-tofu-plan.yml index a78f6c1..1bc3d37 100644 --- a/.gitea/workflows/auto-pr-tofu-plan.yml +++ b/.gitea/workflows/auto-pr-tofu-plan.yml @@ -76,29 +76,29 @@ jobs: - name: Export env vars from Vault .env run: | - echo "Loading cloudflare/.env into GitHub Actions environment..." + echo "🧩 Cleaning and loading cloudflare/.env into GitHub Actions environment..." + + # 1️⃣ Strip any single or double quotes from the file to avoid invalid URIs or extra quoting + sed -i 's/[\"'\'']//g' cloudflare/.env + + echo "✅ Cleaned .env content:" + cat cloudflare/.env + + # 2️⃣ Load all vars into current shell set -a source cloudflare/.env set +a + + # 3️⃣ Export to GitHub Actions environment while IFS='=' read -r key value; do if [[ -n "$key" ]]; then echo "$key=$value" >> $GITHUB_ENV fi done < cloudflare/.env - echo "🧹 Stripping extra quotes from .env values..." - # Remove any single or double quotes from the entire file - sed -i "s/[\"']//g" cloudflare/.env + echo "🌍 Exported environment variables:" + grep -E 'AWS_|VAULT_' cloudflare/.env || true - echo "✅ Cleaned .env:" - - echo "🔧 Loading environment..." - set -a - source cloudflare/.env - set +a - - echo "AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}" - echo "AWS_S3_ENDPOINT=${AWS_S3_ENDPOINT}" - name: Check .env file presence run: |