resetting repo

This commit is contained in:
2025-08-13 23:00:03 +02:00
parent 0859ec4311
commit 73bb1aef5c
39082 changed files with 124052 additions and 1864 deletions

View File

@@ -1,4 +1,4 @@
name: CI/CD Pipeline
name: Generate Skin previews, OSK files and per skin documentation
on:
push:
@@ -23,14 +23,16 @@ 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"
REPO_THUMBNAIL_DIR: "${{ github.workspace }}/media/thumbnail"
SETTINGS_JSON_PATH: "/app/danser/settings/default.json"
README_PATH: "${{ github.workspace }}/README.md"
REPLAY_PATH: "${{ github.workspace }}/src/replay.osr"
GAMEPLAY_REPLAY_PATH: "/app/danser/custom-replays/yomi_yori.osr"
THUMBNAIL_REPLAY_PATH: "/app/danser/custom-replays/combo_colors.osr"
PANEL_REPLAY_PATH: "/app/danser/custom-replays/2000_gekis.osr"
OSK_PATH: "${{ github.workspace }}/export"
IMAGE_NAME: osc/skins-image
REGISTRY_URL: "https://${{ vars.CONTAINER_REGISTRY }}"
@@ -40,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: >-
@@ -170,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: |
@@ -291,7 +292,7 @@ jobs:
echo " → Generating video..."
if ! xvfb-run -a "$DANSER_DIR/danser-cli" \
-replay "$REPLAY_PATH" -record -skip -start=215 -end=230 -noupdatecheck \
-replay "$GAMEPLAY_REPLAY_PATH" -record -skip -start=300 -end=307 -noupdatecheck \
-out="$SKIN_NAME" -skin="$SKIN_NAME" >"$LOGFILE" 2>&1; then
echo " ✖ Video failed for $SKIN_NAME"; cat "$LOGFILE"; INDEX=$((INDEX+1)); continue
fi
@@ -299,9 +300,10 @@ jobs:
if [ -f "$DANSER_VIDEO_DIR/$SKIN_NAME.mp4" ]; then
echo " → Trimming MP4 with ffmpeg..."
ffmpeg -hide_banner -loglevel error \
-ss 5 -t 6.5 \
-i "$DANSER_VIDEO_DIR/$SKIN_NAME.mp4" \
-ss 5 -t 10 \
-c:v h264_nvenc -preset fast -c:a aac -b:a 128k \
-c:v h264_nvenc -preset fast \
-c:a aac -b:a 128k \
"$DANSER_VIDEO_DIR/${SKIN_NAME}_trimmed.mp4"
if [ -f "$DANSER_VIDEO_DIR/${SKIN_NAME}_trimmed.mp4" ]; then
@@ -318,7 +320,7 @@ jobs:
echo " → Taking screenshot..."
if ! xvfb-run -a "$DANSER_DIR/danser-cli" \
-replay "$REPLAY_PATH" -skip -noupdatecheck -ss 243 \
-replay "$PANEL_REPLAY_PATH" -skip -noupdatecheck -ss 28 \
-out="$SKIN_NAME" -skin="$SKIN_NAME" >>"$LOGFILE" 2>&1; then
echo " ✖ Screenshot failed for $SKIN_NAME"; cat "$LOGFILE"; INDEX=$((INDEX+1)); continue
fi
@@ -333,7 +335,7 @@ jobs:
echo " → Taking thumbnail screenshot..."
if ! xvfb-run -a "$DANSER_DIR/danser-cli" \
-replay "$REPLAY_PATH" -skip -noupdatecheck -ss 220 \
-replay "$THUMBNAIL_REPLAY_PATH" -skip -noupdatecheck -ss 1.3 \
-out="${SKIN_NAME}_thumb" -skin="$SKIN_NAME" >>"$LOGFILE" 2>&1; then
echo " ✖ Thumbnail screenshot failed for $SKIN_NAME"; cat "$LOGFILE"; INDEX=$((INDEX+1)); continue
fi
@@ -491,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"
@@ -668,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
@@ -712,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)
@@ -796,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"
@@ -817,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
@@ -844,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"
@@ -858,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"

View File

@@ -1,10 +1,11 @@
{
"order": [
"example1",
"example2"
"- [MAIN] AMONGUS (oldv2)",
"MonkoGlassTest"
],
"descriptions": {
"example1": "Description of example1",
"- [MAIN] AMONGUS (oldv2)": "My main skin",
"example2": "Description of example2"
}
}