Skip to content
10 changes: 10 additions & 0 deletions ephemeral/startup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,13 @@ runs:
shell: bash
run:
${{ inputs.preview-cmd }}

- name: Print logs of ephemeral instance
shell: bash
run: |
log_response=$(curl -X GET \
-H "ls-api-key: ${LOCALSTACK_API_KEY:-${{ inputs.localstack-api-key }}}" \
-H "content-type: application/json" \
https://api.localstack.cloud/v1/compute/instances/$previewName/logs)

echo "$log_response" | jq -r '.[].content'