expect json

This commit is contained in:
2025-10-01 15:19:55 +02:00
parent 34be25888e
commit c1a5162536
3 changed files with 21 additions and 24 deletions

View File

@@ -3,7 +3,7 @@ description: "Pull only LFS objects for changed skins and core assets"
inputs:
changed_skins_file:
description: "Path to file containing changed skins"
description: "Path to file containing changed skins (JSON array)"
required: false
default: ""
@@ -18,15 +18,17 @@ runs:
exit 0
fi
mapfile -t skins < <(jq -r '.[]' "${{ inputs.changed_skins_file }}")
[ "${#skins[@]}" -eq 0 ] && { echo "No skins to process. Exiting."; exit 0; }
includes="src/**,export/**,media/**"
skin_includes=$(
while IFS= read -r skin; do
for skin in "${skins[@]}"; do
esc=$(printf '%s' "$skin" \
| sed -e 's/\[/\\[/g' -e 's/\]/\\]/g')
printf 'Skins/%s/**\n' "$esc"
done < "${{ inputs.changed_skins_file }}" \
| paste -sd ','
done | paste -sd ','
)
includes="$includes,$skin_includes"