From 0008f84eba38ddb6846cf7bc8c6d80f0d17a9a96 Mon Sep 17 00:00:00 2001 From: CC Date: Mon, 15 Jun 2026 22:50:51 +0100 Subject: [PATCH] variable update --- .gitea/workflows/deploy.yml | 1 + .gitea/workflows/test_deploy.yml | 82 ++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 .gitea/workflows/test_deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index b7587d4..4ff82f0 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -25,6 +25,7 @@ jobs: AWS_ACCESS_KEY_ID: https://api.staging.example.com AWS_SECRET_ACCESS_KEY: true AWS_REGION: garage + TF_VAR_vm_ssh_userkey: ${{ secrets.VM_USER_SSHKEY }} steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/test_deploy.yml b/.gitea/workflows/test_deploy.yml new file mode 100644 index 0000000..8229cc5 --- /dev/null +++ b/.gitea/workflows/test_deploy.yml @@ -0,0 +1,82 @@ +name: Terraform Deploy + +on: + workflow_dispatch: + inputs: + instance_mode: + description: "Instance mode" + required: true + default: "single" + type: choice + options: + - single + - multi + + service_name: + description: "Service name (e.g. n8n)" + required: false + default: "" + + vm_name: + description: "VM name (e.g. n8n-01)" + required: false + default: "" + + node_name: + description: "Proxmox node (e.g. pop)" + required: false + default: "" + + app_port: + description: "App port (e.g. 5678)" + required: false + default: "5678" + + vm_tags: + description: "VM tags, comma-separated (e.g. agentic,prod)" + required: false + default: "agentic" + +jobs: + terraform: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Build tfvars + env: + VM_USER_SSHKEY: ${{ secrets.VM_USER_SSHKEY }} + APP_PORT: ${{ github.event.inputs.app_port }} + VM_TAGS: ${{ github.event.inputs.vm_tags }} + run: | + # Convert comma-separated tags to HCL list + TAGS_HCL=$(echo "$VM_TAGS" | tr ',' '\n' | sed 's/^/"/;s/$/"/' | paste -sd ',' | sed 's/^/[/;s/$/]/') + + cat > ci.tfvars <