This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user