resetting repo

This commit is contained in:
2025-08-13 22:56:33 +02:00
parent 0deca12278
commit 60ee167df8
5089 changed files with 966 additions and 1987 deletions

View File

@@ -1,4 +1,4 @@
name: CI/CD Pipeline
name: Generate Skin previews, OSK files and per skin documentation
on:
push:
@@ -23,7 +23,7 @@ env:
DANSER_SCREENSHOT_DIR: "/app/danser/screenshots"
SKINS_DIR: "${{ github.workspace }}/Skins"
DANSER_SKINS_DIR: "/app/danser/skins"
DEFAULT_SKIN_DIR: "${{ github.workspace }}/src/default-skin"
DEFAULT_SKIN_DIR: "/app/danser/skins/default-skin"
REPO_SCREENSHOT_DIR: "${{ github.workspace }}/media/gameplay"
REPO_MOD_ICONS_DIR: "${{ github.workspace }}/media/icons"
REPO_RANKING_PANEL_DIR: "${{ github.workspace }}/media/panel"
@@ -42,7 +42,7 @@ env:
jobs:
generate_everything:
name: Full CI/CD Pipeline
runs-on: ubuntu-latest
runs-on: danser
container:
image: ${{ vars.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
options: >-
@@ -172,7 +172,6 @@ jobs:
echo ""
echo "[Detect Changed Skin Directories Complete — ${#uniq_skins[@]} skins processed, ${#deleted_skins[@]} skins deleted]"
- name: Pull Git LFS objects for changed skins (and core assets)
shell: bash
run: |
@@ -494,15 +493,22 @@ jobs:
for group_list in "$group1_icons" "$group2_icons" "$group3_icons"; do
montage_files=()
for icon in $group_list; do
file=""
if [ -f "${ICON_FOLDER}/selection-mod-${icon}@2x.png" ]; then
montage_files+=("${ICON_FOLDER}/selection-mod-${icon}@2x.png")
file="${ICON_FOLDER}/selection-mod-${icon}@2x.png"
elif [ -f "${ICON_FOLDER}/selection-mod-${icon}.png" ]; then
file="${ICON_FOLDER}/selection-mod-${icon}.png"
elif [ -f "${DEFAULT_SKIN_DIR}/selection-mod-${icon}@2x.png" ]; then
montage_files+=("${DEFAULT_SKIN_DIR}/selection-mod-${icon}@2x.png")
file="${DEFAULT_SKIN_DIR}/selection-mod-${icon}@2x.png"
fi
[ -n "$file" ] && montage_files+=("$file")
done
while [ "${#montage_files[@]}" -lt 7 ]; do
montage_files+=("$BLANK_IMAGE")
done
magick montage "${montage_files[@]}" \
-tile "7x1" -geometry "160x160+10+10" -background none \
"row_${row_index}.png"
@@ -671,6 +677,7 @@ jobs:
declare -A ordered
while IFS= read -r skin; do
[ "$skin" = "default-skin" ] && continue
ordered["$skin"]=1
dir="$DANSER_SKINS_DIR/$skin"
[ ! -d "$dir" ] && continue
@@ -715,6 +722,7 @@ jobs:
for dir in "$DANSER_SKINS_DIR"/*; do
[ -d "$dir" ] || continue
skin="$(basename "$dir")"
[ "$skin" = "default-skin" ] && continue
[[ -n "${ordered[$skin]}" ]] && continue
ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1 || true)
@@ -799,6 +807,7 @@ jobs:
[ -d "$dir" ] || continue
skin=$(basename "$dir")
[ "$skin" = "default-skin" ] && continue
ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1 || true)
skin_header="$skin"
@@ -820,7 +829,7 @@ jobs:
mkdir -p "$(dirname "$md_file_path")"
video_url="$REGISTRY_URL/$USER_REPOSITORY/raw/tag/$new_tag/media/gameplay/${base_path}.mp4"
video_url="$REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/media/gameplay/${base_path}.mp4"
author=""
if [ -f "$ini_file" ]; then
@@ -847,6 +856,28 @@ 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 "| [\`$new_tag (Current)\`]($REGISTRY_URL/$USER_REPOSITORY/src/tag/$new_tag/docs/${base_path}.md) | $current_commit_date |"
old_tags=$(git tag --sort=-v:refname | grep -v "^$new_tag$" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || true)
if [ -n "$old_tags" ]; then
echo "$old_tags" | while read -r tag; do
raw_osk_path="export/${skin}/${skin_header}.osk"
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/$USER_REPOSITORY/src/tag/$tag/docs/${base_path}.md) | $formatted_date |"
fi
done
fi
} > "$md_file_path"
echo " → Wrote $md_file_path"
@@ -861,6 +892,8 @@ jobs:
echo "[Cleanup Extra Files Started]"
[ -f how-to-use.md ] && rm -f how-to-use.md
[ -f src/replay.osr ] && rm -f src/replay.osr
[ -d src/default-skin ] && rm -rf src/default-skin
readarray -t skins <<< "$ALL_SKINS_DIR"