Skip to content

Commit 229e0ef

Browse files
committedDec 21, 2024
debug
1 parent 53714ec commit 229e0ef

File tree

2 files changed

+13
-40
lines changed

2 files changed

+13
-40
lines changed
 

‎.forgejo/workflows/tofu-issue-deploy.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
echo "Extracting issue details..."
1818
ISSUE_BODY="${{ github.event.issue.body }}"
1919
VM_NAME=$(echo "$ISSUE_BODY" | grep -A 2 'VM Name' | tail -n 1 | xargs)
20-
VM_ID=$(echo "$ISSUE_BODY" | grep -A 2 'VM ID' | tail -n 1 | xargs)
20+
VM_ID=$(echo "$ISSUE_BODY" | grep -A 2 'VM ID' | grep -v 'Clone VM ID' | tail -n 1 | xargs)
2121
RAM=$(echo "$ISSUE_BODY" | grep -A 2 'RAM' | tail -n 1 | xargs)
2222
CPUS=$(echo "$ISSUE_BODY" | grep -A 2 'CPU Cores' | tail -n 1 | xargs)
2323
SCPU_TYPE=$(echo "$ISSUE_BODY" | grep -A 2 'CPU Type' | tail -n 1 | xargs)
@@ -100,3 +100,15 @@ jobs:
100100
git add terraform/proxmox/$VM_NAME.tf
101101
git commit -m "Add VM $VM_NAME configuration"
102102
git push
103+
104+
105+
- name: Trigger Terraform Apply Workflow
106+
uses: https://github.com/actions/github-script@v6
107+
with:
108+
script: |
109+
github.rest.actions.createWorkflowDispatch({
110+
owner: context.repo.owner,
111+
repo: context.repo.repo,
112+
workflow_id: "tofu.yml",
113+
ref: "main"
114+
})

‎terraform/proxmox/test.tf

-39
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.