feat: add state-match output
All checks were successful
Check PR title / check (pull_request) Successful in 37s

This commit is contained in:
Maximilian Jugl 2026-05-15 12:09:00 +02:00
parent bfc24a986a
commit 51475a9d48

View file

@ -33,11 +33,16 @@ inputs:
description: "Wait until target state of operation has been reached."
required: false
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:
using: composite
steps:
- name: Trigger SKE operation
id: trigger-op
shell: sh
env:
INPUT_ACTION: ${{ inputs.action }}
@ -129,6 +134,7 @@ runs:
if [ "$CURRENT_STATUS" != "$INITIAL_STATUS" ]; then
if [ "$CURRENT_STATUS" = "$TARGET_STATUS" ]; then
echo "Cluster is already in desired state."
echo "state-match=true" >> "$GITHUB_OUTPUT"
exit 0
fi
@ -136,6 +142,8 @@ runs:
exit 1
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"
if [ "$WAIT" != "true" ]; then