File tree 1 file changed +1
-12
lines changed
1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 18
18
ISSUE_BODY="${{ github.event.issue.body }}"
19
19
echo "ISSUE_BODY=$ISSUE_BODY"
20
20
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)
33
22
34
23
VM_ID=$(echo "$ISSUE_BODY" | grep 'VM ID:' | cut -d':' -f2 | xargs)
35
24
RAM=$(echo "$ISSUE_BODY" | grep 'RAM:' | cut -d':' -f2 | xargs)
You can’t perform that action at this time.
0 commit comments