File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 67
67
68
68
- uses : actions/checkout@v4
69
69
70
+ - name : Check instance exists
71
+ id : check_instance
72
+ run : |
73
+ export OS_CLOUD=BIO180006_IU # Select openstack auth settings defined in ".config/openstack/clouds.yaml"
74
+
75
+ source ~/venv/bin/activate
76
+
77
+ instance=$(openstack server list -f json | \
78
+ jq \
79
+ --arg instance_name "$INSTANCE_NAME" \
80
+ -c '.[] | select(.Name | contains($instance_name))' | \
81
+ jq -r '.Name')
82
+
83
+ [[ $instance == "$INSTANCE_NAME" ]] && exists="true" || exists="false"
84
+
85
+ echo "exists=$exists" >> $GITHUB_OUTPUT
86
+
87
+ env :
88
+ INSTANCE_NAME : ${{ steps.define.outputs.instance_name }}
89
+
70
90
- name : Create instance
91
+ if : !fromJSON(steps.check_instance.outputs.exists)
71
92
run : |
72
93
export OS_CLOUD=BIO180006_IU # Select openstack auth settings defined in ".config/openstack/clouds.yaml"
73
94
You can’t perform that action at this time.
0 commit comments