Files
skins/.gitea/workflows/actions/pull-lfs/action.yml
Arlind Sulejmani b8094c3cd4
Some checks failed
Generate Skin previews, OSK files and per skin documentation / Full CI/CD Pipeline (push) Failing after 10s
clean variables, split workflow in to actions
2025-09-30 22:22:25 +02:00

36 lines
1.0 KiB
YAML

name: "Pull Git LFS Objects"
description: "Pull only LFS objects for changed skins and core assets"
inputs:
changed_skins_file:
description: "Path to file containing changed skins"
required: false
default: ""
runs:
using: "composite"
steps:
- name: Pull Git LFS objects
shell: bash
run: |
if [ -z "${{ inputs.changed_skins_file }}" ] || [ ! -s "${{ inputs.changed_skins_file }}" ]; then
echo "No skins changed. Skipping git pull lfs."
exit 0
fi
includes="src/**,export/**,media/**"
skin_includes=$(
while IFS= read -r skin; do
esc=$(printf '%s' "$skin" \
| sed -e 's/\[/\\[/g' -e 's/\]/\\]/g')
printf 'Skins/%s/**\n' "$esc"
done < "${{ inputs.changed_skins_file }}" \
| paste -sd ','
)
includes="$includes,$skin_includes"
echo "→ Pulling LFS objects for patterns: $includes"
git lfs pull --include="$includes"