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: "Generate WEBP mod icons from skins and convert panel/thumbnail PNG
inputs:
changed_skins_file:
description: "Path to file with changed skins"
description: "Path to file containing changed skins (JSON array)"
required: true
runs:
@@ -19,7 +19,7 @@ runs:
exit 0
fi
mapfile -t skin_dirs < "${{ inputs.changed_skins_file }}"
mapfile -t skin_dirs < <(jq -r '.[]' "${{ inputs.changed_skins_file }}")
[ "${#skin_dirs[@]}" -eq 0 ] && { echo "No skins to process. Exiting."; exit 0; }
sanitize_filename() {
@@ -80,7 +80,6 @@ runs:
elif [ -f "${DEFAULT_SKIN_DIR}/selection-mod-${icon}@2x.png" ]; then
file="${DEFAULT_SKIN_DIR}/selection-mod-${icon}@2x.png"
fi
[ -n "$file" ] && montage_files+=("$file")
done
@@ -121,7 +120,7 @@ runs:
exit 0
fi
mapfile -t skins < "${{ inputs.changed_skins_file }}"
mapfile -t skins < <(jq -r '.[]' "${{ inputs.changed_skins_file }}")
[ "${#skins[@]}" -eq 0 ] && { echo "No skins to process. Exiting."; exit 0; }
convert_pngs_to_webp() {