From 32c834175967b3ab1f85b16114052fe60fee4bce Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Fri, 20 Dec 2024 22:52:30 -0500 Subject: [PATCH] debug --- .forgejo/workflows/tofu-issue-deploy.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.forgejo/workflows/tofu-issue-deploy.yml b/.forgejo/workflows/tofu-issue-deploy.yml index d226213..6c4935f 100644 --- a/.forgejo/workflows/tofu-issue-deploy.yml +++ b/.forgejo/workflows/tofu-issue-deploy.yml @@ -18,18 +18,7 @@ jobs: ISSUE_BODY="${{ github.event.issue.body }}" echo "ISSUE_BODY=$ISSUE_BODY" - # Check if 'VM Name' is in the body - echo "$ISSUE_BODY" | grep 'VM Name' # This should print the line with 'VM Name' - - # Extract the value for VM_NAME - VM_NAME=$(echo "$ISSUE_BODY" | grep -A 1 'VM Name' | tail -n 1 | xargs) - echo "Extracted VM_NAME: '$VM_NAME'" # Debugging extracted value - - if [ -z "$VM_NAME" ]; then - echo "Error: VM_NAME is empty. Check the formatting of the input." - else - echo "VM_NAME=$VM_NAME" # Display the value if extracted correctly - fi + VM_NAME=$(echo "$ISSUE_BODY" | awk '/VM Name/{getline; print $0}' | xargs) VM_ID=$(echo "$ISSUE_BODY" | grep 'VM ID:' | cut -d':' -f2 | xargs) RAM=$(echo "$ISSUE_BODY" | grep 'RAM:' | cut -d':' -f2 | xargs)