diff --git a/action.yml b/action.yml index 2e6fe53..77c6f3f 100644 --- a/action.yml +++ b/action.yml @@ -101,8 +101,16 @@ runs: exit 1 fi + echo "::group::Authenticating with service account and triggering operation" + + STACKIT_ACCESS_TOKEN="$(stackit auth activate-service-account --only-print-access-token)" + export STACKIT_ACCESS_TOKEN + + stackit config set --project-id "$INPUT_PROJECT_ID" stackit curl --fail -X POST "https://ske.api.stackit.cloud/v2/projects/$INPUT_PROJECT_ID/regions/$INPUT_REGION/clusters/$INPUT_CLUSTER_NAME/$ENDPOINT" + echo "::endgroup::" + if [ "$WAIT" != "true" ]; then echo "Operation triggered. No wait requested, exiting." exit 0