diff --git a/.github/workflows/update-studio-docs.yml b/.github/workflows/update-studio-docs.yml index 5eefca90c8..b88828a96e 100644 --- a/.github/workflows/update-studio-docs.yml +++ b/.github/workflows/update-studio-docs.yml @@ -18,13 +18,16 @@ jobs: # ----------------------------- - name: Validate payload run: | - for key in version name notes url target_branch; do - if [ -z "${{ github.event.client_payload[key] }}" ]; then + required_keys=(version name notes url target_branch) + + for key in "${required_keys[@]}"; do + value="$(jq -r --arg key "$key" '.client_payload[$key] // ""' "$GITHUB_EVENT_PATH")" + + if [ -z "$value" ] || [ "$value" = "null" ]; then echo "Missing payload field: $key" exit 1 fi done - # ----------------------------- # Checkout dev # -----------------------------