-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: Ensure instance flavor associated with issue is used
- Loading branch information
Showing
1 changed file
with
25 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,29 @@ jobs: | |
runs-on: self-hosted | ||
if: github.event.label.name == 'instance:approved' | ||
steps: | ||
- name: Issue Forms Body Parser | ||
id: parse | ||
uses: zentered/[email protected] | ||
|
||
- name: Display parsed data | ||
run: | | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | jq . | ||
- name: Extract fields | ||
id: extract | ||
run: | | ||
email=$( | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | | ||
jq -r ".email.text" | ||
) | ||
echo "email=$email" >> $GITHUB_OUTPUT | ||
instance_flavor=$( | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | | ||
jq -r '."instance-flavor".text | split(" - ")[0]' | ||
) | ||
echo "instance_flavor=$instance_flavor" >> $GITHUB_OUTPUT | ||
- name: Create instance | ||
id: instance_create | ||
run: | | ||
|
@@ -25,7 +48,7 @@ jobs: | |
--nic net-id="auto_allocated_network" \ | ||
--security-group "default" \ | ||
--security-group "exosphere" \ | ||
--flavor g3.large \ | ||
--flavor $INSTANCE_FLAVOR \ | ||
--image "antsthings-vgl-gpu-image" \ | ||
--wait \ | ||
--column created \ | ||
|
@@ -37,6 +60,7 @@ jobs: | |
echo "instance_name=$instance_name" >> $GITHUB_OUTPUT | ||
env: | ||
NUMBER: ${{ github.event.issue.number }} | ||
INSTANCE_FLAVOR: ${{ steps.extract.outputs.instance_flavor }} | ||
|
||
- name: Create floating IP | ||
id: ip_create | ||
|
@@ -64,23 +88,6 @@ jobs: | |
IP_ADDRESS: ${{ steps.ip_create.outputs.floating_ip_address }} | ||
INSTANCE_NAME: ${{ steps.instance_create.outputs.instance_name }} | ||
|
||
- name: Issue Forms Body Parser | ||
id: parse | ||
uses: zentered/[email protected] | ||
|
||
- name: Display parsed data | ||
run: | | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | jq . | ||
- name: Extract fields | ||
id: extract | ||
run: | | ||
email=$( | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | | ||
jq -r ".email.text" | ||
) | ||
echo "email=$email" >> $GITHUB_OUTPUT | ||
- name: Send mail | ||
uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 | ||
with: | ||
|