Skip to content

Commit 6744c9f

Browse files
committed
test
1 parent 148f9b6 commit 6744c9f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/validate-new-plugin-metadata.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ jobs:
9494
9595
# Handle arrays of URLs (e.g., screenshots)
9696
# Check if the field is an array using yq length check
97-
is_array=$(echo "$metadata" | yq -r ".${field} | length")
98-
99-
if [[ "$is_array" =~ ^[0-9]+$ && "$is_array" -gt 0 ]]; then
97+
local field_type
98+
field_type=$(echo "$metadata" | yq -r ".${field} | type")
99+
100+
if [[ "$field_type" == "!!seq" ]]; then
100101
# Iterate properly over array elements
101-
for url in $(echo "$metadata" | yq -r ".$field[]" || true); do
102+
for url in $(echo "$metadata" | yq ".$field" | .[]'); do
102103
if [[ -z "$url" ]]; then # Skip empty values inside arrays
103104
continue
104105
fi

0 commit comments

Comments
 (0)