Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4749256334 | |||
| bec7a743bb |
2 changed files with 9 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ The key must be tied to a service account which has editor privileges on SKE res
|
||||||
- name: Install STACKIT CLI
|
- name: Install STACKIT CLI
|
||||||
uses: https://stackit-solutions.git.onstackit.cloud/actions/install-stackit-cli@v1
|
uses: https://stackit-solutions.git.onstackit.cloud/actions/install-stackit-cli@v1
|
||||||
- name: Hibernate cluster
|
- name: Hibernate cluster
|
||||||
uses: https://stackit-solutions.git.onstackit.cloud/actions/ske-operations@v1
|
uses: https://stackit-solutions.git.onstackit.cloud/actions/ske-operations@v2
|
||||||
with:
|
with:
|
||||||
action: hibernate
|
action: hibernate
|
||||||
region: eu01
|
region: eu01
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,16 @@ inputs:
|
||||||
description: "Wait until target state of operation has been reached."
|
description: "Wait until target state of operation has been reached."
|
||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
|
outputs:
|
||||||
|
state-match:
|
||||||
|
description: "A boolean value to indicate that the target state was already reached"
|
||||||
|
value: ${{ steps.trigger-op.outputs.state-match }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger SKE operation
|
- name: Trigger SKE operation
|
||||||
|
id: trigger-op
|
||||||
shell: sh
|
shell: sh
|
||||||
env:
|
env:
|
||||||
INPUT_ACTION: ${{ inputs.action }}
|
INPUT_ACTION: ${{ inputs.action }}
|
||||||
|
|
@ -129,6 +134,7 @@ runs:
|
||||||
if [ "$CURRENT_STATUS" != "$INITIAL_STATUS" ]; then
|
if [ "$CURRENT_STATUS" != "$INITIAL_STATUS" ]; then
|
||||||
if [ "$CURRENT_STATUS" = "$TARGET_STATUS" ]; then
|
if [ "$CURRENT_STATUS" = "$TARGET_STATUS" ]; then
|
||||||
echo "Cluster is already in desired state."
|
echo "Cluster is already in desired state."
|
||||||
|
echo "state-match=true" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -136,6 +142,8 @@ runs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "state-match=false" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
stackit curl --fail -X POST "https://ske.api.stackit.cloud/v2/projects/$INPUT_PROJECT_ID/regions/$INPUT_REGION/clusters/$INPUT_CLUSTER_NAME/$ENDPOINT"
|
stackit curl --fail -X POST "https://ske.api.stackit.cloud/v2/projects/$INPUT_PROJECT_ID/regions/$INPUT_REGION/clusters/$INPUT_CLUSTER_NAME/$ENDPOINT"
|
||||||
|
|
||||||
if [ "$WAIT" != "true" ]; then
|
if [ "$WAIT" != "true" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue