forked from docs/doc-exports
adding dynamic fetch of token
This commit is contained in:
@ -89,13 +89,18 @@ jobs:
|
||||
|
||||
- name: Validate OpenAPI files + show validation results
|
||||
env:
|
||||
OPENAPI_TOKEN: ${{ secrets.OPENAPI_TOKEN }}
|
||||
INTERNAL_OPENAPI_KEY: ${{ secrets.INTERNAL_OPENAPI_KEY }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
MAX_ATTEMPTS=30 # ~5 minutes total (30 * 10s)
|
||||
SLEEP_SECONDS=10
|
||||
|
||||
# --- Fetching access token ---
|
||||
OPENAPI_TOKEN=$(curl -X POST "https://openapi-validator.eco-preprod.tsi-dev.otc-service.com/api/token/machine" \
|
||||
-H "X-Internal-Api-Key: $INTERNAL_OPENAPI_KEY" | jq .access_token)
|
||||
echo "::add-mask::$OPENAPI_TOKEN"
|
||||
|
||||
while IFS= read -r url; do
|
||||
[ -z "$url" ] && continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user