Add ADMIN API KEY

This commit is contained in:
Alexey Masterov
2025-04-14 10:40:08 +02:00
parent 6ebc6e3994
commit 9a89a8e9ee
2 changed files with 7 additions and 2 deletions
@@ -99,6 +99,7 @@ runs:
# Mask password
echo "::add-mask::$(echo $project | jq --raw-output '.roles[] | select(.name != "web_access") | .password')"
set -x
dsn=$(echo $project | jq --raw-output '.connection_uris[0].connection_uri')
echo "::add-mask::${dsn}"
@@ -141,10 +142,13 @@ runs:
fi
# XXX
# This is a workaround for project's settings which don't work well in public API now
# /regions/aws-us-east-2/api/v1/admin/projects/super-sound-08287150
if { [[ -n "${PROJECT_SETTINGS}" ]] && [[ "${PROJECT_SETTINGS}" != "{}" ]] } || { [[ -n "${DEFAULT_ENDPOINT_SETTINGS}" ]] && [[ "${DEFAULT_ENDPOINT_SETTINGS}" != "{}" ]] }; then
echo ${PROJECT_SETTINGS}
echo ${DEFAULT_ENDPOINT_SETTINGS}
if ( [[ -n "${PROJECT_SETTINGS}" ]] && [[ "${PROJECT_SETTINGS}" != "{}" ]] ) || ( [[ -n "${DEFAULT_ENDPOINT_SETTINGS}" ]] && [[ "${DEFAULT_ENDPOINT_SETTINGS}" != "{}" ]] ); then
PROJECT_DATA=$(curl -X GET \
"https://${API_HOST}/regions/${REGION_ID}/api/v1/admin/projects/${project_id}" \
-H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer ${ADMIN_API_KEY}" \
-d "{\"scheduling\": \"Essential\"}"
)
echo ${PROJECT_DATA} | jq .
fi
+1
View File
@@ -72,6 +72,7 @@ jobs:
postgres_version: ${{ matrix.pg-version }}
project_settings: ${{ steps.project-settings.outputs.settings }}
api_key: ${{ secrets.NEON_STAGING_API_KEY }}
admin_api_key: ${{ secrets.NEON_STAGING_ADMIN_API_KEY }}
- name: Run the regression tests
run: /run-tests.sh -r /ext-src