test
All checks were successful
Generate Skin previews, OSK files and per skin documentation / Full CI/CD Pipeline (push) Successful in 30s

This commit is contained in:
2025-10-01 13:37:49 +02:00
parent dcf166df5b
commit beb9723b2c

View File

@@ -1,5 +1,6 @@
name: "Discover and Detect Skins"
description: "Find all skins and detect which ones changed since last tag or based on inputs"
inputs:
force_rebuild:
description: "Force rebuild all skins"
@@ -9,10 +10,20 @@ inputs:
description: "Comma-separated list of skins to rebuild"
required: false
default: ""
outputs:
changed_skins_file:
description: "Path to file containing changed skins"
value: ${{ steps.detect.outputs.changed_skins_file }}
all_skins:
description: "All discovered skins (newline-delimited list)"
value: ${{ steps.discover_all.outputs.all_skins }}
runs:
using: "composite"
steps:
- name: Discover all skins
id: discover_all
shell: bash
run: |
echo "Discovering all skins in $SKINS_DIR…"
@@ -20,21 +31,22 @@ runs:
find "$SKINS_DIR" -mindepth 1 -maxdepth 1 -type d \
| sed 's|'"$SKINS_DIR"'/||'
)
# Write all skins to output
{
echo 'ALL_SKINS_DIR<<EOF'
echo "all_skins<<EOF"
for s in "${skins[@]}"; do
echo "$s"
done
echo 'EOF'
} >> "$GITHUB_ENV"
echo "→ ALL_SKINS_DIR set (newline-delimited list)"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Detect Changed Skin Directories
id: detect
shell: bash
run: |
echo "[Detect Changed Skin Directories Started]"
readarray -t all_skins <<< "$ALL_SKINS_DIR"
readarray -t all_skins <<< "${{ steps.discover_all.outputs.all_skins }}"
force_rebuild="${{ inputs.force_rebuild }}"
target_skins="${{ inputs.target_skins }}"
@@ -89,7 +101,6 @@ runs:
else
echo " ✓ No skins deleted"
fi
else
echo "→ No tag found. Falling back to ALL_SKINS_DIR for full list…"
skins=("${all_skins[@]}")
@@ -110,13 +121,13 @@ runs:
echo ""
if [ "${#uniq_skins[@]}" -eq 0 ]; then
echo "→ No added/modified skins detected."
echo "CHANGED_SKINS_FILE=" >> "$GITHUB_ENV"
echo "changed_skins_file=" >> "$GITHUB_OUTPUT"
else
echo "[Writing Changed Skins to File]"
changed_skins_file=$(mktemp)
printf "%s\n" "${uniq_skins[@]}" > "$changed_skins_file"
echo " ✓ Skins written to $changed_skins_file"
echo "CHANGED_SKINS_FILE=$changed_skins_file" >> "$GITHUB_ENV"
echo "changed_skins_file=$changed_skins_file" >> "$GITHUB_OUTPUT"
fi
echo ""