Skip to content

Commit 9392b05

Browse files
authored
Add support for LOCALSTACK_AUTH_TOKEN on ephemeral instances suite (#47)
1 parent aadd2c7 commit 9392b05

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ephemeral/shutdown/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ runs:
3636
run: |
3737
response=$(curl -X DELETE \
3838
-s -o /dev/null -w "%{http_code}" \
39-
-H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \
39+
-H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \
4040
-H "content-type: application/json" \
4141
https://api.localstack.cloud/v1/compute/instances/$previewName)
4242
if [[ "$response" -ne 200 ]]; then

ephemeral/startup/action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,21 @@ runs:
7373
lifetime="${{ inputs.lifetime }}"
7474
7575
list_response=$(curl -X GET \
76-
-H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \
76+
-H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \
7777
-H "content-type: application/json" \
7878
https://api.localstack.cloud/v1/compute/instances)
7979
8080
instance_exists=$(echo "$list_response" | jq --arg NAME "$previewName" '.[] | select(.instance_name == $NAME)')
8181
8282
if [ -n "$instance_exists" ]; then
8383
del_response=$(curl -X DELETE \
84-
-H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \
84+
-H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \
8585
-H "content-type: application/json" \
8686
https://api.localstack.cloud/v1/compute/instances/$previewName)
8787
fi
8888
8989
response=$(curl -X POST -d "{\"instance_name\": \"${previewName}\", \"lifetime\": ${lifetime} ,\"env_vars\": {\"AUTO_LOAD_POD\": \"${autoLoadPod}\", \"EXTENSION_AUTO_INSTALL\": \"${extensionAutoInstall}\"}}"\
90-
-H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \
90+
-H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \
9191
-H "content-type: application/json" \
9292
https://api.localstack.cloud/v1/compute/instances)
9393
endpointUrl=$(echo "$response" | jq -r .endpoint_url)
@@ -118,7 +118,7 @@ runs:
118118
shell: bash
119119
run: |
120120
log_response=$(curl -X GET \
121-
-H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \
121+
-H "ls-api-key: ${LOCALSTACK_AUTH_TOKEN:-${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}}" \
122122
-H "content-type: application/json" \
123123
https://api.localstack.cloud/v1/compute/instances/$previewName/logs)
124124

0 commit comments

Comments
 (0)