diff --git a/.gitea/workflows/auto-pr-tofu-plan.yml b/.gitea/workflows/auto-pr-tofu-plan.yml index 941e1df..dda9a71 100644 --- a/.gitea/workflows/auto-pr-tofu-plan.yml +++ b/.gitea/workflows/auto-pr-tofu-plan.yml @@ -50,7 +50,7 @@ jobs: notification_message: "PR Check done 🎟️" plan: - name: Terraform/OpenTofu Plan + name: OpenTofu Plan needs: check-and-create-pr runs-on: ubuntu-latest env: @@ -59,7 +59,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup OpenTofu / Terraform + - name: Setup OpenTofu uses: opentofu/setup-opentofu@v1.0.6 with: version: ${{ env.OPENTOFU_VERSION }} @@ -104,31 +104,6 @@ jobs: HC_VAULT_SECRETS_PATH: tar-valon-terraform/env ENV_FILE_NAME: cloudflare/.env - - name: Export env vars from Vault .env - run: | - 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 "🌍 Exported environment variables:" - grep -E 'AWS_|VAULT_' cloudflare/.env || true - - name: Run tofu init uses: dnogu/tofu-init@v1 with: @@ -171,6 +146,7 @@ jobs: uses: https://git.trez.wtf/Trez.One/git-auto-comment@main with: platform: gitea + api_url: https://git.trez.wtf/api/v1 token: ${{ secrets.BOT_GITEA_TOKEN }} pr_index: ${{ steps.tea-pr-index.outputs.pr_number }} plan_file: cloudflare.tfplan