-
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: exit create workflow if instance already exist
- Loading branch information
Showing
1 changed file
with
19 additions
and
2 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 |
---|---|---|
|
@@ -84,9 +84,27 @@ jobs: | |
env: | ||
INSTANCE_NAME: ${{ steps.define.outputs.instance_name }} | ||
|
||
- name: instance already exists comment (failure) | ||
if: ${{ fromJSON(steps.check_instance.outputs.exists) }} | ||
uses: peter-evans/[email protected] | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
### Instance Creation Results ❌ | ||
Instance **${{ steps.define.outputs.instance_name }}** already exists. | ||
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
- name: instance already exists exit (failure) | ||
if: ${{ fromJSON(steps.check_instance.outputs.exists) }} | ||
run: | | ||
echo "::error Instance $INSTANCE_NAME already exists" | ||
exit 1 | ||
env: | ||
INSTANCE_NAME: ${{ steps.define.outputs.instance_name }} | ||
|
||
- name: Create floating IP | ||
id: ip_create | ||
if: ${{ !fromJSON(steps.check_instance.outputs.exists) }} | ||
run: | | ||
export OS_CLOUD=BIO180006_IU # Select openstack auth settings defined in ".config/openstack/clouds.yaml" | ||
|
@@ -110,7 +128,6 @@ jobs: | |
echo "floating_ip_address=$floating_ip_address" >> $GITHUB_OUTPUT | ||
- name: Create instance | ||
if: ${{ !fromJSON(steps.check_instance.outputs.exists) }} | ||
run: | | ||
export OS_CLOUD=BIO180006_IU # Select openstack auth settings defined in ".config/openstack/clouds.yaml" | ||
|