Skip to content

Commit 32c8341

Browse files
committedDec 21, 2024
debug
1 parent e23990b commit 32c8341

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed
 

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

+1-12
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,7 @@ jobs:
1818
ISSUE_BODY="${{ github.event.issue.body }}"
1919
echo "ISSUE_BODY=$ISSUE_BODY"
2020
21-
# Check if 'VM Name' is in the body
22-
echo "$ISSUE_BODY" | grep 'VM Name' # This should print the line with 'VM Name'
23-
24-
# Extract the value for VM_NAME
25-
VM_NAME=$(echo "$ISSUE_BODY" | grep -A 1 'VM Name' | tail -n 1 | xargs)
26-
echo "Extracted VM_NAME: '$VM_NAME'" # Debugging extracted value
27-
28-
if [ -z "$VM_NAME" ]; then
29-
echo "Error: VM_NAME is empty. Check the formatting of the input."
30-
else
31-
echo "VM_NAME=$VM_NAME" # Display the value if extracted correctly
32-
fi
21+
VM_NAME=$(echo "$ISSUE_BODY" | awk '/VM Name/{getline; print $0}' | xargs)
3322
3423
VM_ID=$(echo "$ISSUE_BODY" | grep 'VM ID:' | cut -d':' -f2 | xargs)
3524
RAM=$(echo "$ISSUE_BODY" | grep 'RAM:' | cut -d':' -f2 | xargs)

0 commit comments

Comments
 (0)
Please sign in to comment.