Browse Source

Merge pull request #24804 from abpframework/skoc/action

fix(workflow): improve payload validation in update-studio-docs workflow
MaxTypeFullNameLength
Muhammed Ali ÖZKAYA 2 days ago
committed by GitHub
parent
commit
2efc8d2c42
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      .github/workflows/update-studio-docs.yml

9
.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
# -----------------------------

Loading…
Cancel
Save