api_url.
This commit is contained in:
@@ -50,7 +50,7 @@ jobs:
|
|||||||
notification_message: "PR Check done 🎟️"
|
notification_message: "PR Check done 🎟️"
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
name: Terraform/OpenTofu Plan
|
name: OpenTofu Plan
|
||||||
needs: check-and-create-pr
|
needs: check-and-create-pr
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup OpenTofu / Terraform
|
- name: Setup OpenTofu
|
||||||
uses: opentofu/setup-opentofu@v1.0.6
|
uses: opentofu/setup-opentofu@v1.0.6
|
||||||
with:
|
with:
|
||||||
version: ${{ env.OPENTOFU_VERSION }}
|
version: ${{ env.OPENTOFU_VERSION }}
|
||||||
@@ -104,31 +104,6 @@ jobs:
|
|||||||
HC_VAULT_SECRETS_PATH: tar-valon-terraform/env
|
HC_VAULT_SECRETS_PATH: tar-valon-terraform/env
|
||||||
ENV_FILE_NAME: cloudflare/.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
|
- name: Run tofu init
|
||||||
uses: dnogu/tofu-init@v1
|
uses: dnogu/tofu-init@v1
|
||||||
with:
|
with:
|
||||||
@@ -171,6 +146,7 @@ jobs:
|
|||||||
uses: https://git.trez.wtf/Trez.One/git-auto-comment@main
|
uses: https://git.trez.wtf/Trez.One/git-auto-comment@main
|
||||||
with:
|
with:
|
||||||
platform: gitea
|
platform: gitea
|
||||||
|
api_url: https://git.trez.wtf/api/v1
|
||||||
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
pr_index: ${{ steps.tea-pr-index.outputs.pr_number }}
|
pr_index: ${{ steps.tea-pr-index.outputs.pr_number }}
|
||||||
plan_file: cloudflare.tfplan
|
plan_file: cloudflare.tfplan
|
||||||
|
|||||||
Reference in New Issue
Block a user