fix per skin md
All checks were successful
Generate Skin previews, OSK files and per skin documentation / Detect Changed Skins (push) Successful in 3s
Generate Skin previews, OSK files and per skin documentation / Calculate Git Tag (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Prepare Assets (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Generate Videos and Screenshots (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Generate Mod Icons (WEBP) (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Create OSK Files (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Generate Per-Skin Docs (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Generate README (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Rename Assets Based on skin.ini (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Convert PNGs to WEBPs (push) Has been skipped
Generate Skin previews, OSK files and per skin documentation / Git Commit and Push (push) Has been skipped

This commit is contained in:
2025-07-30 16:47:11 +02:00
parent 61bf61ebce
commit b267096251

View File

@@ -811,7 +811,9 @@ jobs:
generate_per_skin_docs:
name: Generate Per-Skin Docs
runs-on: danser
needs: calculate_git_tag
needs:
- calculate_git_tag
- detect_changed_skins
if: (needs.detect_changed_skins.outputs.has_changes == 'true') || (github.event.inputs.soft_run == 'true')
container:
image: ${{ vars.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
@@ -845,8 +847,6 @@ jobs:
echo "$encoded"
}
mkdir -p "$DOC_DIR"
for dir in "$SKINS_DIR"/*; do
[ -d "$dir" ] || continue
@@ -855,22 +855,22 @@ jobs:
skin_header="$skin"
if [ -f "$ini_file" ]; then
line=$(grep -i '^[[:space:]]*Name:' "$ini_file" | head -n1 || true)
if [ -n "$line" ]; then
val="${line#*:}"
name_line=$(grep -a -i -m1 'Name[[:space:]]*:' "$ini_file" || true)
if [ -n "$name_line" ]; then
val="${name_line#*:}"
val="$(echo "$val" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
if [ -n "$val" ]; then
skin_header=$(sanitize_filename "$val")
fi
[ -n "$val" ] && skin_header=$(sanitize_filename "$val")
fi
else
continue
fi
raw_path="${skin}/${skin_header}"
base_path=$(url_encode_path "$raw_path")
osk_url="$REGISTRY_URL/${{ needs.detect_changed_skins.outputs.user_repository }}/media/tag/${{ needs.calculate_git_tag.outputs.new_tag }}/export/${base_path}.osk"
md_file_path="${DOC_DIR}/${raw_path}.md"
mkdir -p "$(dirname "$md_file_path")"
osk_url="$REGISTRY_URL/${{ needs.detect_changed_skins.outputs.user_repository }}/media/tag/${{ needs.calculate_git_tag.outputs.new_tag }}/export/${base_path}.osk"
video_url="$REGISTRY_URL/${{ needs.detect_changed_skins.outputs.user_repository }}/raw/tag/${{ needs.calculate_git_tag.outputs.new_tag }}/media/gameplay/${base_path}.mp4"
author=""
@@ -884,8 +884,7 @@ jobs:
{
echo "# [$skin_header]($osk_url)"
echo ""
[ -n "$author" ] && echo "**Author:** $author"
[ -n "$author" ] && echo ""
[ -n "$author" ] && echo "**Author:** $author" && echo ""
echo "## Hitsounds"
echo "<video controls autoplay loop muted playsinline src=\"$video_url\" type=\"video/mp4\"></video>"
@@ -898,13 +897,14 @@ jobs:
echo "## Mod Icons"
echo "![](/media/icons/${base_path}-mod-icons.webp)"
echo ""
echo "## Build History"
echo ""
echo "| Version | Date |"
echo "| ------- | ---- |"
current_commit_date=$(TZ="Europe/Zurich" date -d "$(git log -1 --format=%cI)" "+%d.%m.%Y %H:%M:%S")
echo "| [\${{ needs.calculate_git_tag.outputs.new_tag }} (Current)\]($REGISTRY_URL/${{ needs.detect_changed_skins.outputs.user_repository }}/src/tag/${{ needs.calculate_git_tag.outputs.new_tag }}/docs/${base_path}.md) | $current_commit_date |"
echo "| [${{ needs.calculate_git_tag.outputs.new_tag }} (Current)]($REGISTRY_URL/${{ needs.detect_changed_skins.outputs.user_repository }}/src/tag/${{ needs.calculate_git_tag.outputs.new_tag }}/docs/${base_path}.md) | $current_commit_date |"
old_tags=$(git tag --sort=-v:refname | grep -v "^${{ needs.calculate_git_tag.outputs.new_tag }}$" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || true)
if [ -n "$old_tags" ]; then
@@ -913,7 +913,7 @@ jobs:
if git ls-tree -r --name-only "$tag" | grep -Fx -- "$raw_osk_path" >/dev/null; then
tag_date=$(git log -1 --format=%ci "$tag")
formatted_date=$(TZ="Europe/Zurich" date -d "$tag_date" "+%d.%m.%Y %H:%M:%S")
echo "| [\$tag\]($REGISTRY_URL/${{ needs.detect_changed_skins.outputs.user_repository }}/src/tag/$tag/docs/${base_path}.md) | $formatted_date |"
echo "| [$tag]($REGISTRY_URL/${{ needs.detect_changed_skins.outputs.user_repository }}/src/tag/$tag/docs/${base_path}.md) | $formatted_date |"
fi
done
fi