|
13 | 13 | runs-on: self-hosted
|
14 | 14 | if: github.event.label.name == 'instance:approved'
|
15 | 15 | steps:
|
| 16 | + - name: Issue Forms Body Parser |
| 17 | + id: parse |
| 18 | + |
| 19 | + |
| 20 | + - name: Display parsed data |
| 21 | + run: | |
| 22 | + echo ${{ toJSON(steps.parse.outputs.data) }} | jq . |
| 23 | +
|
| 24 | + - name: Extract fields |
| 25 | + id: extract |
| 26 | + run: | |
| 27 | + email=$( |
| 28 | + echo ${{ toJSON(steps.parse.outputs.data) }} | |
| 29 | + jq -r ".email.text" |
| 30 | + ) |
| 31 | + echo "email=$email" >> $GITHUB_OUTPUT |
| 32 | +
|
| 33 | + instance_flavor=$( |
| 34 | + echo ${{ toJSON(steps.parse.outputs.data) }} | |
| 35 | + jq -r '."instance-flavor".text | split(" - ")[0]' |
| 36 | + ) |
| 37 | + echo "instance_flavor=$instance_flavor" >> $GITHUB_OUTPUT |
| 38 | +
|
16 | 39 | - name: Create instance
|
17 | 40 | id: instance_create
|
18 | 41 | run: |
|
|
25 | 48 | --nic net-id="auto_allocated_network" \
|
26 | 49 | --security-group "default" \
|
27 | 50 | --security-group "exosphere" \
|
28 |
| - --flavor g3.large \ |
| 51 | + --flavor $INSTANCE_FLAVOR \ |
29 | 52 | --image "antsthings-vgl-gpu-image" \
|
30 | 53 | --wait \
|
31 | 54 | --column created \
|
|
37 | 60 | echo "instance_name=$instance_name" >> $GITHUB_OUTPUT
|
38 | 61 | env:
|
39 | 62 | NUMBER: ${{ github.event.issue.number }}
|
| 63 | + INSTANCE_FLAVOR: ${{ steps.extract.outputs.instance_flavor }} |
40 | 64 |
|
41 | 65 | - name: Create floating IP
|
42 | 66 | id: ip_create
|
|
64 | 88 | IP_ADDRESS: ${{ steps.ip_create.outputs.floating_ip_address }}
|
65 | 89 | INSTANCE_NAME: ${{ steps.instance_create.outputs.instance_name }}
|
66 | 90 |
|
67 |
| - - name: Issue Forms Body Parser |
68 |
| - id: parse |
69 |
| - |
70 |
| - |
71 |
| - - name: Display parsed data |
72 |
| - run: | |
73 |
| - echo ${{ toJSON(steps.parse.outputs.data) }} | jq . |
74 |
| -
|
75 |
| - - name: Extract fields |
76 |
| - id: extract |
77 |
| - run: | |
78 |
| - email=$( |
79 |
| - echo ${{ toJSON(steps.parse.outputs.data) }} | |
80 |
| - jq -r ".email.text" |
81 |
| - ) |
82 |
| - echo "email=$email" >> $GITHUB_OUTPUT |
83 |
| -
|
84 | 91 | - name: Send mail
|
85 | 92 | uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0
|
86 | 93 | with:
|
|
0 commit comments