expect json
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user