From 712657855b3c2cc4a512fd94f9e54908ed80c0fd Mon Sep 17 00:00:00 2001 From: lukqw Date: Wed, 26 Feb 2025 13:10:37 +0100 Subject: [PATCH 1/3] add test file --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test diff --git a/test b/test new file mode 100644 index 0000000..e69de29 From 705f360eae376cb5b4f2da7fe8b0119bf1a531f7 Mon Sep 17 00:00:00 2001 From: lukqw Date: Thu, 27 Feb 2025 11:11:57 +0100 Subject: [PATCH 2/3] read from auth token first, key second --- ephemeral/shutdown/action.yml | 2 +- ephemeral/startup/action.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ephemeral/shutdown/action.yml b/ephemeral/shutdown/action.yml index 84f0cb8..6b7910b 100644 --- a/ephemeral/shutdown/action.yml +++ b/ephemeral/shutdown/action.yml @@ -36,7 +36,7 @@ runs: run: | response=$(curl -X DELETE \ -s -o /dev/null -w "%{http_code}" \ - -H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \ + -H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \ -H "content-type: application/json" \ https://api.localstack.cloud/v1/compute/instances/$previewName) if [[ "$response" -ne 200 ]]; then diff --git a/ephemeral/startup/action.yml b/ephemeral/startup/action.yml index 9f33fa4..5a580b3 100644 --- a/ephemeral/startup/action.yml +++ b/ephemeral/startup/action.yml @@ -73,7 +73,7 @@ runs: lifetime="${{ inputs.lifetime }}" list_response=$(curl -X GET \ - -H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \ + -H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \ -H "content-type: application/json" \ https://api.localstack.cloud/v1/compute/instances) @@ -81,13 +81,13 @@ runs: if [ -n "$instance_exists" ]; then del_response=$(curl -X DELETE \ - -H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \ + -H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \ -H "content-type: application/json" \ https://api.localstack.cloud/v1/compute/instances/$previewName) fi response=$(curl -X POST -d "{\"instance_name\": \"${previewName}\", \"lifetime\": ${lifetime} ,\"env_vars\": {\"AUTO_LOAD_POD\": \"${autoLoadPod}\", \"EXTENSION_AUTO_INSTALL\": \"${extensionAutoInstall}\"}}"\ - -H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \ + -H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \ -H "content-type: application/json" \ https://api.localstack.cloud/v1/compute/instances) endpointUrl=$(echo "$response" | jq -r .endpoint_url) @@ -118,7 +118,7 @@ runs: shell: bash run: | log_response=$(curl -X GET \ - -H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \ + -H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \ -H "content-type: application/json" \ https://api.localstack.cloud/v1/compute/instances/$previewName/logs) From e3a0bdc26009d1c417a2d85ed1636432a506cae6 Mon Sep 17 00:00:00 2001 From: lukqw Date: Thu, 27 Feb 2025 11:15:26 +0100 Subject: [PATCH 3/3] remove test file --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test diff --git a/test b/test deleted file mode 100644 index e69de29..0000000