add fix inshallah

This commit is contained in:
2025-10-28 21:55:07 +01:00
parent ace7709b29
commit d60d9b55a4

View File

@@ -27,20 +27,22 @@ runs:
shell: bash shell: bash
run: | run: |
echo "Discovering all skins in $SKINS_DIR…" echo "Discovering all skins in $SKINS_DIR…"
temp_discover="/tmp/discover_skins_$RANDOM.txt"
find "$SKINS_DIR" -mindepth 1 -maxdepth 1 -type d \ # Find all skins and create JSON, write to shared file
| sed 's|'"$SKINS_DIR"'/||' > "$temp_discover" all_skins_file="/tmp/all_skins_shared.json"
mapfile -t skins < "$temp_discover" find "$SKINS_DIR" -mindepth 1 -maxdepth 1 -type d -print0 \
rm -f "$temp_discover" | xargs -0 -n1 basename \
| jq -R . | jq -cs . > "$all_skins_file"
json=""
json="$(printf '%s\n' "${skins[@]}" | jq -R . | jq -cs .)" json=$(cat "$all_skins_file")
{ {
echo "all_skins<<EOF" echo "all_skins<<EOF"
echo "$json" echo "$json"
echo "EOF" echo "EOF"
} >> "$GITHUB_OUTPUT" } >> "$GITHUB_OUTPUT"
echo "all_skins_file=$all_skins_file" >> "$GITHUB_OUTPUT"
- name: Detect Changed Skin Directories - name: Detect Changed Skin Directories
id: detect id: detect
@@ -49,12 +51,9 @@ runs:
set -e set -e
echo "[Detect Changed Skin Directories Started]" echo "[Detect Changed Skin Directories Started]"
# Parse JSON back into Bash array - avoid command substitution with parentheses # Read from shared file instead of using GitHub Actions output
all_skins_json='${{ steps.discover_all.outputs.all_skins }}' all_skins_file="/tmp/all_skins_shared.json"
temp_skins_file="/tmp/all_skins_$RANDOM.txt" mapfile -t all_skins < <(jq -r '.[]' "$all_skins_file")
printf '%s' "$all_skins_json" | jq -r '.[]' > "$temp_skins_file"
mapfile -t all_skins < "$temp_skins_file"
rm -f "$temp_skins_file"
force_rebuild="${{ inputs.force_rebuild }}" force_rebuild="${{ inputs.force_rebuild }}"
target_skins="${{ inputs.target_skins }}" target_skins="${{ inputs.target_skins }}"