From 07fe59e237251001c57c06d487b2b1d21142352c Mon Sep 17 00:00:00 2001 From: Melchior Reimers Date: Wed, 4 Feb 2026 19:34:58 +0100 Subject: [PATCH] updated ci/cd --- .gitea/workflows/deploy.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index cf2860d..bd92854 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -33,9 +33,15 @@ jobs: run: | set -e # Kopiere das Template und ersetze die Platzhalter mit sed - cp terraform.tfvars.example terraform.tfvars - sed -i "s|__HCLOUD_TOKEN__|${HETZNER_TOKEN}|g" terraform.tfvars - sed -i "s|__SSH_KEY__|${SSH_KEY}|g" terraform.tfvars + python - <<'PY' + from pathlib import Path + import os + + content = Path("terraform.tfvars.example").read_text() + content = content.replace("__HCLOUD_TOKEN__", os.environ["HETZNER_TOKEN"]) + content = content.replace("__SSH_KEY__", os.environ["SSH_KEY"]) + Path("terraform.tfvars").write_text(content) + PY terraform init terraform apply -auto-approve