generated from osc/skins-template
clean variables, split workflow in to actions
Some checks failed
Generate Skin previews, OSK files and per skin documentation / Full CI/CD Pipeline (push) Failing after 10s
Some checks failed
Generate Skin previews, OSK files and per skin documentation / Full CI/CD Pipeline (push) Failing after 10s
This commit is contained in:
35
.gitea/workflows/actions/pull-lfs/action.yml
Normal file
35
.gitea/workflows/actions/pull-lfs/action.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user