diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b7a3202d..34259d0a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,12 +2,19 @@ name: CI/CD Pipeline on: push: - branches: - - main paths: - - '.gitea/workflows/ci.yml' + - '.gitea/workflows/*' - 'Skins/**/*' workflow_dispatch: + inputs: + force_rebuild: + description: 'Force rebuild all skins' + required: false + default: 'false' + target_skins: + description: 'Comma-separated list of skin folder names to rebuild (e.g., "Skin1,Skin2")' + required: false + default: '' env: DANSER_PATH: "/app/danser/danser-cli" @@ -20,19 +27,22 @@ env: 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" OSK_PATH: "${{ github.workspace }}/export" - IMAGE_NAME: arlind/skins - REGISTRY_URL: "https://${{ secrets.CONTAINER_REGISTRY }}" + IMAGE_NAME: osc/skins-image + REGISTRY_URL: "https://${{ vars.CONTAINER_REGISTRY }}" + OSU_ID: ${{ vars.OSUID }} + DOC_DIR: "${{ github.workspace }}/docs" jobs: generate_everything: name: Full CI/CD Pipeline runs-on: ubuntu-latest container: - image: ${{ secrets.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest + image: ${{ vars.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest options: >- --gpus all --privileged @@ -43,25 +53,159 @@ jobs: --env NVIDIA_VISIBLE_DEVICES=all --user 0:0 steps: - - name: Checkout Repository + - name: Checkout repository uses: actions/checkout@v4 with: + fetch-depth: 0 + tags: true token: ${{ secrets.TOKEN }} - - name: Git LFS Pull + - name: Discover all skins + shell: bash run: | - echo "Pulling Git LFS files..." - git lfs pull - echo "LFS files pulled." + echo "Discovering all skins in $SKINS_DIR…" + mapfile -t skins < <( + find "$SKINS_DIR" -mindepth 1 -maxdepth 1 -type d \ + | sed 's|'"$SKINS_DIR"'/||' + ) + { + echo 'ALL_SKINS_DIR<> "$GITHUB_ENV" + echo "→ ALL_SKINS_DIR set (newline-delimited list)" + + - name: Detect Changed Skin Directories + shell: bash + run: | + echo "[Detect Changed Skin Directories Started]" + + readarray -t all_skins <<< "$ALL_SKINS_DIR" + + force_rebuild="${{ github.event.inputs.force_rebuild }}" + target_skins="${{ github.event.inputs.target_skins }}" + skins=() + deleted_skins=() + + echo "→ Force rebuild flag: $force_rebuild" + echo "→ Target skins input: $target_skins" + + if [[ "$force_rebuild" == "true" ]]; then + echo "→ Force rebuild is enabled. Using ALL_SKINS_DIR for full list…" + skins=("${all_skins[@]}") + echo " ✓ Found ${#skins[@]} skin directories (from ALL_SKINS_DIR)" + + elif [[ -n "$target_skins" ]]; then + echo "→ Target skins specified. Using target_skins input…" + IFS=',' read -r -a input_skins <<< "$target_skins" + for s in "${input_skins[@]}"; do + s="${s#"${s%%[![:space:]]*}"}" # trim leading whitespace + s="${s%"${s##*[![:space:]]}"}" # trim trailing whitespace + [[ -n "$s" ]] && skins+=("$s") + done + echo " ✓ Found ${#skins[@]} skin(s) from target_skins input" + + else + echo "→ No rebuild flags set. Finding latest git tag..." + latest_tag=$(git tag --sort=-creatordate | head -n 1 || true) + + if [[ -n "$latest_tag" ]]; then + echo "→ Latest tag found: $latest_tag" + echo "→ Finding added/modified skins since $latest_tag…" + + mapfile -t skins < <( + git diff --name-only -z --diff-filter=AM "$latest_tag" HEAD \ + | while IFS= read -r -d '' file; do + [[ $file == Skins/* ]] && echo "${file#Skins/}" | cut -d/ -f1 + done + ) + echo " ✓ Found ${#skins[@]} added/modified skins" + + echo "→ Finding deleted skins since $latest_tag…" + mapfile -t deleted_skins < <( + git diff --name-only -z --diff-filter=D "$latest_tag" HEAD \ + | while IFS= read -r -d '' file; do + [[ $file == Skins/* ]] && echo "${file#Skins/}" | cut -d/ -f1 + done + ) + if [ "${#deleted_skins[@]}" -gt 0 ]; then + for d in "${deleted_skins[@]}"; do + echo "→ Skin '$d' was deleted" + done + else + echo " ✓ No skins deleted" + fi + + else + echo "→ No tag found. Falling back to ALL_SKINS_DIR for full list…" + skins=("${all_skins[@]}") + echo " ✓ Found ${#skins[@]} skin directories (from ALL_SKINS_DIR)" + fi + fi + + echo "" + echo "[Cleaning Skin Names]" + uniq_skins=() + for skin in "${skins[@]}"; do + skin="${skin#"${skin%%[![:space:]]*}"}" + skin="${skin%"${skin##*[![:space:]]}"}" + [[ -n "$skin" ]] && uniq_skins+=("$skin") + done + echo " ✓ ${#uniq_skins[@]} valid skin names after cleaning" + + echo "" + if [ "${#uniq_skins[@]}" -eq 0 ]; then + echo "→ No added/modified skins detected." + echo "CHANGED_SKINS_FILE=" >> "$GITHUB_ENV" + else + echo "[Writing Changed Skins to File]" + changed_skins_file=$(mktemp) + printf "%s\n" "${uniq_skins[@]}" > "$changed_skins_file" + echo " ✓ Skins written to $changed_skins_file" + echo "CHANGED_SKINS_FILE=$changed_skins_file" >> "$GITHUB_ENV" + fi + + 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: | + if [ -z "${CHANGED_SKINS_FILE:-}" ] || [ ! -s "$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 < "$CHANGED_SKINS_FILE" \ + | paste -sd ',' + ) + + includes="$includes,$skin_includes" + + echo "→ Pulling LFS objects for patterns: $includes" + git lfs pull --include="$includes" - name: Extract Repository path + shell: bash run: | - FULL_WORKSPACE_PATH="${{ github.workspace }}" - USER_REPOSITORY="${FULL_WORKSPACE_PATH#/workspace/}" + echo "Extracting repository path..." + USER_REPOSITORY="${{ github.workspace }}" + USER_REPOSITORY="${USER_REPOSITORY#/workspace/}" USER_REPOSITORY="${USER_REPOSITORY%/}" + echo "Repository path extracted: $USER_REPOSITORY" echo "USER_REPOSITORY=$USER_REPOSITORY" >> $GITHUB_ENV - name: Set XDG_RUNTIME_DIR + shell: bash run: | echo "Setting XDG_RUNTIME_DIR..." mkdir -p /tmp/xdg_runtime_dir @@ -70,26 +214,34 @@ jobs: echo "XDG_RUNTIME_DIR set." - name: Create directories for assets + shell: bash run: | - echo "Creating asset directories..." - mkdir -p "$REPO_SCREENSHOT_DIR" - mkdir -p "$REPO_MOD_ICONS_DIR" - mkdir -p "$REPO_RANKING_PANEL_DIR" - mkdir -p "$OSK_PATH" - echo "Asset directories created successfully." + echo "Creating base directories for assets..." + mkdir -p "$REPO_SCREENSHOT_DIR" "$REPO_MOD_ICONS_DIR" "$REPO_RANKING_PANEL_DIR" "$OSK_PATH" "$REPO_THUMBNAIL_DIR" + + readarray -t skins <<< "$ALL_SKINS_DIR" + + for skin in "${skins[@]}"; do + echo " → Creating subdirs for '$skin'…" + mkdir -p \ + "$REPO_SCREENSHOT_DIR/$skin" \ + "$REPO_MOD_ICONS_DIR/$skin" \ + "$REPO_RANKING_PANEL_DIR/$skin" \ + "$OSK_PATH/$skin" \ + "$REPO_THUMBNAIL_DIR/$skin" + done + + echo "All asset directories created for ${#skins[@]} skins." - name: Create New Tag + shell: bash run: | echo "Computing new tag..." - git fetch --tags >/dev/null 2>&1 latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "") if [ -z "$latest_tag" ]; then new_tag="v1.0.0" else - version=${latest_tag#v} - major=$(echo "$version" | cut -d. -f1) - minor=$(echo "$version" | cut -d. -f2) - patch=$(echo "$version" | cut -d. -f3) + IFS='.' read -r major minor patch <<< "${latest_tag#v}" minor=$((minor + 1)) patch=0 new_tag="v${major}.${minor}.${patch}" @@ -98,6 +250,7 @@ jobs: echo "Computed new tag: $new_tag" - name: Move Skin files to Danser Skins directory + shell: bash run: | echo "Moving Skin files to Danser Skins directory..." mkdir -p "$DANSER_SKINS_DIR" @@ -105,266 +258,384 @@ jobs: echo "Skin files moved." - name: Generate Danser videos and screenshots + shell: bash run: | echo "[Danser Job Started]" - SKIN_COUNT=$(find "$DANSER_SKINS_DIR" -mindepth 1 -maxdepth 1 -type d | wc -l) + if [ -z "${CHANGED_SKINS_FILE:-}" ] || [ ! -s "$CHANGED_SKINS_FILE" ]; then + echo "No skins changed. Skipping generation." + exit 0 + fi + + mapfile -t skins < "$CHANGED_SKINS_FILE" + [ "${#skins[@]}" -eq 0 ] && { echo "No skins to process. Exiting."; exit 0; } + + SKIN_COUNT=${#skins[@]} INDEX=1 - for skin in "$DANSER_SKINS_DIR"/*/; do - if [ -d "$skin" ]; then - SKIN_NAME=$(basename "$skin") - echo "" - echo "[$INDEX/$SKIN_COUNT] Skin: $SKIN_NAME" + for skin_path in "${skins[@]}"; do + [ -z "$skin_path" ] && continue + SKIN_DIR="$DANSER_SKINS_DIR/$skin_path" + [ ! -d "$SKIN_DIR" ] && { echo "Skipping missing skin: $skin_path"; continue; } - LOGFILE="/tmp/danser_log_$SKIN_NAME.txt" - FFMPEG_LOG="/tmp/ffmpeg_log_$SKIN_NAME.txt" + SKIN_NAME="$skin_path" + OUT_VIDEO_DIR="$REPO_SCREENSHOT_DIR/$SKIN_NAME" + OUT_PNG_DIR="$REPO_RANKING_PANEL_DIR/$SKIN_NAME" + OUT_THUMBNAIL_DIR="$REPO_THUMBNAIL_DIR/$SKIN_NAME" - echo " → Generating video..." - if ! xvfb-run -a "$DANSER_DIR/danser-cli" -replay "$REPLAY_PATH" -record -skip -start=215 -end=230 -noupdatecheck -out="$SKIN_NAME" -skin "$SKIN_NAME" >"$LOGFILE" 2>&1; then - echo " ✖ Video generation failed for $SKIN_NAME. Log output:" - cat "$LOGFILE" - exit 1 - fi - - echo " → Taking screenshot..." - if ! xvfb-run -a "$DANSER_DIR/danser-cli" -replay "$REPLAY_PATH" -skip -noupdatecheck -ss 243 -out="$SKIN_NAME" -skin "$SKIN_NAME" >>"$LOGFILE" 2>&1; then - echo " ✖ Screenshot generation failed for $SKIN_NAME. Log output:" - cat "$LOGFILE" - exit 1 - fi - - if [ -f "$DANSER_VIDEO_DIR/$SKIN_NAME.mp4" ]; then - echo " → Converting to GIF..." - if ! ffmpeg -y -hwaccel cuda -ss 4 -t 10 -i "$DANSER_VIDEO_DIR/$SKIN_NAME.mp4" \ - -filter_complex "[0:v] fps=24,scale=720:-1:flags=lanczos,palettegen [p]; \ - [0:v] fps=24,scale=720:-1:flags=lanczos [x]; \ - [x][p] paletteuse" \ - -c:v gif "$DANSER_VIDEO_DIR/$SKIN_NAME.gif" >"$FFMPEG_LOG" 2>&1; then - echo " ✖ FFmpeg conversion failed for $SKIN_NAME. Log output:" - cat "$FFMPEG_LOG" - exit 1 - fi - mv "$DANSER_VIDEO_DIR/$SKIN_NAME.gif" "$REPO_SCREENSHOT_DIR/$SKIN_NAME.gif" - fi - - if [ -f "$DANSER_SCREENSHOT_DIR/$SKIN_NAME.png" ]; then - mv "$DANSER_SCREENSHOT_DIR/$SKIN_NAME.png" "$REPO_RANKING_PANEL_DIR/$SKIN_NAME.png" - fi - - echo " ✓ Completed" - INDEX=$((INDEX + 1)) - fi - done - - echo "" - echo "[Danser Job Finished — $SKIN_COUNT skins processed]" - - - name: Rename Generated Assets Based on skin.ini - run: | - echo "[Asset Renaming Started]" - - INDEX=1 - SKIN_COUNT=$(find "$DANSER_SKINS_DIR" -mindepth 1 -maxdepth 1 -type d | wc -l) - - for skin_path in "$DANSER_SKINS_DIR"/*/; do - if [ -d "$skin_path" ]; then - SKIN_NAME=$(basename "$skin_path") - - echo "" - echo "[$INDEX/$SKIN_COUNT] Skin: $SKIN_NAME" - - ini_file=$(find "$skin_path" -maxdepth 1 -iname "skin.ini" | head -n1) - skin_header="$SKIN_NAME" - - if [ -f "$ini_file" ]; then - name_line=$(grep -i '^[[:space:]]*name:' "$ini_file" | head -n1) - if [ -n "$name_line" ]; then - new_name=$(echo "$name_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') - [ -n "$new_name" ] && skin_header="$new_name" - fi - fi - - original_gif="$REPO_SCREENSHOT_DIR/$SKIN_NAME.gif" - renamed_gif="$REPO_SCREENSHOT_DIR/$skin_header.gif" - - if [ -f "$original_gif" ] && [ "$original_gif" != "$renamed_gif" ]; then - mv -f "$original_gif" "$renamed_gif" - echo " ✓ Renamed GIF" - else - echo " → No GIF to rename or already named correctly" - fi - - original_png="$REPO_RANKING_PANEL_DIR/$SKIN_NAME.png" - renamed_png="$REPO_RANKING_PANEL_DIR/$skin_header.png" - - if [ -f "$original_png" ] && [ "$original_png" != "$renamed_png" ]; then - mv -f "$original_png" "$renamed_png" - echo " ✓ Renamed PNG" - else - echo " → No PNG to rename or already named correctly" - fi - - echo " ✓ Completed" - INDEX=$((INDEX + 1)) - fi - done - - echo "" - echo "[Asset Renaming Complete — $SKIN_COUNT skins processed]" - - - name: Generate Mod Icons - run: | - echo "[Mod Icon Generation Started]" - - ICONS_JSON_FILE="${{ github.workspace }}/.gitea/workflows/icons.json" - - group1_icons=$(jq -r '.group1 | join(" ")' "$ICONS_JSON_FILE") - group2_icons=$(jq -r '.group2 | join(" ")' "$ICONS_JSON_FILE") - group3_icons=$(jq -r '.group3 | join(" ")' "$ICONS_JSON_FILE") - - SKIN_COUNT=$(find "$DANSER_SKINS_DIR" -mindepth 1 -maxdepth 1 -type d | wc -l) - INDEX=1 - - for skin_path in "$DANSER_SKINS_DIR"/*/; do - if [ -d "$skin_path" ]; then - SKIN_NAME=$(basename "$skin_path") - echo "" - echo "[$INDEX/$SKIN_COUNT] Skin: $SKIN_NAME" - - ini_file=$(find "$skin_path" -maxdepth 1 -iname "skin.ini" | head -n1) - skin_header="$SKIN_NAME" - if [ -f "$ini_file" ]; then - name_line=$(grep -i '^[[:space:]]*name:' "$ini_file" | head -n1) - if [ -n "$name_line" ]; then - new_name=$(echo "$name_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') - if [ -n "$new_name" ]; then - skin_header="$new_name" - fi - fi - fi - - ICON_FOLDER="$skin_path" - OUTPUT="${REPO_MOD_ICONS_DIR}/${skin_header}-mod-icons.png" - TILE_SIZE=160 - PADDING=10 - MAX_ICONS=7 - - BLANK_IMAGE="blank.png" - magick -size "${TILE_SIZE}x${TILE_SIZE}" xc:none "$BLANK_IMAGE" - - row_images="" - row_index=1 - - for group_list in "$group1_icons" "$group2_icons" "$group3_icons"; do - montage_files="" - count=0 - - for icon in $group_list; do - icon_path="${ICON_FOLDER}/selection-mod-${icon}@2x.png" - if [ -f "$icon_path" ]; then - montage_files="$montage_files \"$icon_path\"" - count=$((count + 1)) - elif [ -f "$DEFAULT_SKIN_DIR/selection-mod-${icon}@2x.png" ]; then - montage_files="$montage_files \"$DEFAULT_SKIN_DIR/selection-mod-${icon}@2x.png\"" - count=$((count + 1)) - fi - done - - missing=$(( MAX_ICONS - count )) - if [ "$missing" -lt 0 ]; then - missing=0 - fi - i=0 - while [ "$i" -lt "$missing" ]; do - montage_files="$montage_files \"$BLANK_IMAGE\"" - i=$((i + 1)) - done - - row_file="row_${row_index}.png" - eval "magick montage $montage_files -tile \"${MAX_ICONS}x1\" -geometry \"${TILE_SIZE}x${TILE_SIZE}+${PADDING}+${PADDING}\" -background none \"$row_file\"" - - row_images="$row_images \"$row_file\"" - row_index=$((row_index + 1)) - done - - num_rows=0 - for _ in $row_images; do - num_rows=$((num_rows + 1)) - done - - eval "magick montage $row_images -tile \"1x${num_rows}\" -geometry \"+${PADDING}+${PADDING}\" -background none \"$OUTPUT\"" - - rm "$BLANK_IMAGE" - rm row_*.png - - echo " ✓ Completed" - INDEX=$((INDEX + 1)) - fi - done - - echo "" - echo "[Mod Icon Generation Finished — $SKIN_COUNT skins processed]" - - - name: Create OSK files - run: | - echo "[OSK Creation Job Started]" - - SKIN_COUNT=$(find "$DANSER_SKINS_DIR" -mindepth 1 -maxdepth 1 -type d | wc -l) - INDEX=1 - - FIXED_TIMESTAMP="2025-01-01 00:00:00" - - find "$DANSER_SKINS_DIR" -mindepth 1 -maxdepth 1 -type d | sort | while IFS= read -r skin; do - SKIN_FOLDER=$(basename "$skin") echo "" - echo "[$INDEX/$SKIN_COUNT] Processing skin folder: $SKIN_FOLDER" + echo "[$INDEX/$SKIN_COUNT] Generating for skin: $SKIN_NAME" - ini_file=$(find "$skin" -maxdepth 1 -iname "skin.ini" | head -n1) - if [ -f "$ini_file" ]; then - name_line=$(grep -i '^[[:space:]]*name:' "$ini_file" | head -n1) - if [ -n "$name_line" ]; then - new_name=$(echo "$name_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') - if [ -n "$new_name" ]; then - SKIN_FOLDER="$new_name" - fi + LOGFILE="/tmp/danser_log_$INDEX.txt" + + echo " → Generating video..." + if ! xvfb-run -a "$DANSER_DIR/danser-cli" \ + -replay "$REPLAY_PATH" -record -skip -start=215 -end=230 -noupdatecheck \ + -out="$SKIN_NAME" -skin="$SKIN_NAME" >"$LOGFILE" 2>&1; then + echo " ✖ Video failed for $SKIN_NAME"; cat "$LOGFILE"; INDEX=$((INDEX+1)); continue + fi + + if [ -f "$DANSER_VIDEO_DIR/$SKIN_NAME.mp4" ]; then + echo " → Trimming MP4 with ffmpeg..." + ffmpeg -hide_banner -loglevel error \ + -i "$DANSER_VIDEO_DIR/$SKIN_NAME.mp4" \ + -ss 5 -t 10 \ + -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 + mv "$DANSER_VIDEO_DIR/${SKIN_NAME}_trimmed.mp4" "$DANSER_VIDEO_DIR/$SKIN_NAME.mp4" + mkdir -p "$OUT_VIDEO_DIR" + mv "$DANSER_VIDEO_DIR/$SKIN_NAME.mp4" "$OUT_VIDEO_DIR/$SKIN_NAME.mp4" + echo " ✓ Trimmed MP4 moved to $OUT_VIDEO_DIR/" + else + echo " ✖ ffmpeg trimming failed for $SKIN_NAME" fi else - echo " → No skin.ini found, using folder name." + echo " ✖ No MP4 found for $SKIN_NAME" fi - osk_file="${OSK_PATH}/${SKIN_FOLDER}.osk" - - if ! (cd "$skin" && find . -type f -exec touch -d "$FIXED_TIMESTAMP" {} +); then - echo " ✖ Failed to normalize timestamps in $skin" - exit 1 + echo " → Taking screenshot..." + if ! xvfb-run -a "$DANSER_DIR/danser-cli" \ + -replay "$REPLAY_PATH" -skip -noupdatecheck -ss 243 \ + -out="$SKIN_NAME" -skin="$SKIN_NAME" >>"$LOGFILE" 2>&1; then + echo " ✖ Screenshot failed for $SKIN_NAME"; cat "$LOGFILE"; INDEX=$((INDEX+1)); continue fi - if ( - cd "$skin" && \ - find . -type f | sort | zip -rq -D -X -9 --compression-method deflate "$osk_file" -@ - ); then - echo " ✓ OSK file created successfully." + if [ -f "$DANSER_SCREENSHOT_DIR/$SKIN_NAME.png" ]; then + mkdir -p "$OUT_PNG_DIR" + mv "$DANSER_SCREENSHOT_DIR/$SKIN_NAME.png" "$OUT_PNG_DIR/$SKIN_NAME.png" + echo " ✓ PNG moved to $OUT_PNG_DIR/" else - echo " ✖ Failed to create OSK file: $osk_file" - exit 1 + echo " ✖ No PNG found for $SKIN_NAME" + fi + + echo " → Taking thumbnail screenshot..." + if ! xvfb-run -a "$DANSER_DIR/danser-cli" \ + -replay "$REPLAY_PATH" -skip -noupdatecheck -ss 220 \ + -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 + + if [ -f "$DANSER_SCREENSHOT_DIR/${SKIN_NAME}_thumb.png" ]; then + mkdir -p "$OUT_THUMBNAIL_DIR" + mv "$DANSER_SCREENSHOT_DIR/${SKIN_NAME}_thumb.png" "$OUT_THUMBNAIL_DIR/$SKIN_NAME.png" + echo " ✓ Thumbnail PNG moved to $OUT_THUMBNAIL_DIR/" + else + echo " ✖ No thumbnail PNG found for $SKIN_NAME" fi INDEX=$((INDEX + 1)) done echo "" - echo "[OSK Creation Job Finished — $SKIN_COUNT skins processed]" + echo "[Danser Job Finished — processed $SKIN_COUNT skins]" + + - name: Rename Generated Assets Based on skin.ini + shell: bash + run: | + echo "[Asset Renaming Job Started]" + + if [ -z "${CHANGED_SKINS_FILE:-}" ] || [ ! -s "$CHANGED_SKINS_FILE" ]; then + echo "No skins changed. Skipping asset renaming." + exit 0 + fi + + mapfile -t skins < "$CHANGED_SKINS_FILE" + [ "${#skins[@]}" -eq 0 ] && { echo "No skins to rename. Exiting."; exit 0; } + + SKIN_COUNT=${#skins[@]} + INDEX=1 + + sanitize_filename() { + echo "$1" | \ + tr -d '\000-\037' | \ + sed -e 's#[\\/:\*\?"<>|]#-#g' | \ + sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' + } + + for skin_path in "${skins[@]}"; do + [ -z "$skin_path" ] && continue + SKIN_DIR_NAME="$skin_path" + SKIN_DIR="$DANSER_SKINS_DIR/$skin_path" + if [ ! -d "$SKIN_DIR" ]; then + echo "Skipping missing skin directory: $SKIN_DIR" + continue + fi + + echo "Processing skin $INDEX/$SKIN_COUNT: $SKIN_DIR_NAME" + + skin_header="$SKIN_DIR_NAME" + ini_file=$(find "$SKIN_DIR" -maxdepth 1 -iname "skin.ini" | head -n1 || true) + if [ -f "$ini_file" ]; then + name_line=$(grep -i '^[[:space:]]*Name:' "$ini_file" | head -n1 || true) + if [ -n "$name_line" ]; then + val="${name_line#*:}" + val="$(echo "$val" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" + sanitized="$(sanitize_filename "$val")" + [ -n "$sanitized" ] && skin_header="$sanitized" + fi + fi + + VIDEO_DIR="$REPO_SCREENSHOT_DIR/$SKIN_DIR_NAME" + PNG_DIR="$REPO_RANKING_PANEL_DIR/$SKIN_DIR_NAME" + THUMBNAIL_DIR="$REPO_THUMBNAIL_DIR/$SKIN_DIR_NAME" + + if [ -f "$VIDEO_DIR/$SKIN_DIR_NAME.mp4" ] && [ "$SKIN_DIR_NAME" != "$skin_header" ]; then + mv -f "$VIDEO_DIR/$SKIN_DIR_NAME.mp4" \ + "$VIDEO_DIR/$skin_header.mp4" || true + echo " ✓ Renamed MP4 to $VIDEO_DIR/$skin_header.mp4" + fi + + if [ -f "$PNG_DIR/$SKIN_DIR_NAME.png" ] && [ "$SKIN_DIR_NAME" != "$skin_header" ]; then + mv -f "$PNG_DIR/$SKIN_DIR_NAME.png" \ + "$PNG_DIR/$skin_header.png" || true + echo " ✓ Renamed PNG to $PNG_DIR/$skin_header.png" + fi + + if [ -f "$THUMBNAIL_DIR/$SKIN_DIR_NAME.png" ] && [ "$SKIN_DIR_NAME" != "$skin_header" ]; then + mv -f "$THUMBNAIL_DIR/$SKIN_DIR_NAME.png" \ + "$THUMBNAIL_DIR/$skin_header.png" || true + echo " ✓ Renamed thumbnail to $THUMBNAIL_DIR/$skin_header.png" + fi + + INDEX=$((INDEX + 1)) + done + + echo "" + echo "[Asset Renaming Complete — processed $SKIN_COUNT skins]" + + - name: Generate Mod Icons (WEBP) + shell: bash + run: | + echo "[Mod Icon Generation Job Started]" + + if [ -z "${CHANGED_SKINS_FILE:-}" ] || [ ! -s "$CHANGED_SKINS_FILE" ]; then + echo "No skins changed. Skipping mod icon generation." + exit 0 + fi + + mapfile -t skin_dirs < "$CHANGED_SKINS_FILE" + [ "${#skin_dirs[@]}" -eq 0 ] && { echo "No skins to process. Exiting."; exit 0; } + + sanitize_filename() { + echo "$1" | \ + tr -d '\000-\037' | \ + sed -e 's#[\\/:\*\?"<>|]#-#g' | \ + sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' + } + + ICONS_JSON_FILE="${{ github.workspace }}/.gitea/workflows/icons.json" + group1_icons=$(jq -r '.group1 | join(" ")' "$ICONS_JSON_FILE") + group2_icons=$(jq -r '.group2 | join(" ")' "$ICONS_JSON_FILE") + group3_icons=$(jq -r '.group3 | join(" ")' "$ICONS_JSON_FILE") + + BLANK_IMAGE="blank.png" + magick -size "160x160" xc:none "$BLANK_IMAGE" + + SKIN_COUNT=${#skin_dirs[@]} + INDEX=1 + + for skin_path in "${skin_dirs[@]}"; do + SKIN_DIR="$DANSER_SKINS_DIR/$skin_path" + [ ! -d "$SKIN_DIR" ] && { echo "Skipping missing skin directory: $SKIN_DIR"; ((INDEX++)); continue; } + + skin_header="$skin_path" + ini_file=$(find "$SKIN_DIR" -maxdepth 1 -iname "skin.ini" | head -n1 || true) + if [ -f "$ini_file" ]; then + name_line=$(grep -i '^[[:space:]]*Name:' "$ini_file" | head -n1 || true) + if [ -n "$name_line" ]; then + val="${name_line#*:}" + val="$(echo "$val" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" + sanitized="$(sanitize_filename "$val")" + [ -n "$sanitized" ] && skin_header="$sanitized" + fi + fi + + echo "" + echo "[$INDEX/$SKIN_COUNT] Skin: $skin_header" + + ICON_FOLDER="$SKIN_DIR" + OUTPUT_DIR="$REPO_MOD_ICONS_DIR/$skin_path" + mkdir -p "$OUTPUT_DIR" + OUTPUT="$OUTPUT_DIR/${skin_header}-mod-icons.webp" + + row_images=() + row_index=1 + + for group_list in "$group1_icons" "$group2_icons" "$group3_icons"; do + montage_files=() + for icon in $group_list; do + if [ -f "${ICON_FOLDER}/selection-mod-${icon}@2x.png" ]; then + montage_files+=("${ICON_FOLDER}/selection-mod-${icon}@2x.png") + elif [ -f "${DEFAULT_SKIN_DIR}/selection-mod-${icon}@2x.png" ]; then + montage_files+=("${DEFAULT_SKIN_DIR}/selection-mod-${icon}@2x.png") + fi + 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" + row_images+=("row_${row_index}.png") + row_index=$((row_index + 1)) + done + + magick montage "${row_images[@]}" \ + -tile "1x${#row_images[@]}" -geometry "+10+10" -background none \ + "temp_combined.png" + + magick "temp_combined.png" -define webp:lossless=true "$OUTPUT" + rm temp_combined.png row_*.png + + echo " ✓ Mod Icons Generated at $OUTPUT" + INDEX=$((INDEX + 1)) + done + + rm "$BLANK_IMAGE" + + echo "" + echo "[Mod Icon Generation Finished — processed $SKIN_COUNT skins]" + + - name: Convert PNGs to WEBPs + shell: bash + run: | + echo "[Convert PNG → WEBP Started]" + + if [ -z "${CHANGED_SKINS_FILE:-}" ] || [ ! -s "$CHANGED_SKINS_FILE" ]; then + echo "No skins changed. Skipping conversion." + exit 0 + fi + + mapfile -t skins < "$CHANGED_SKINS_FILE" + [ "${#skins[@]}" -eq 0 ] && { echo "No skins to process. Exiting."; exit 0; } + + convert_pngs_to_webp() { + local base_dir="$1" + local skin_path="$2" + local dir="$base_dir/$skin_path" + echo " → Processing: $dir" + [ ! -d "$dir" ] && { echo " ✖ Directory does not exist: $dir"; return; } + find "$dir" -type f -iname "*.png" | while read -r png; do + webp="${png%.png}.webp" + echo " ↳ Converting: $png → $webp" + magick "$png" -define webp:lossless=false -quality 90 "$webp" && rm -f "$png" + done + } + + for skin_path in "${skins[@]}"; do + [ -z "$skin_path" ] && continue + convert_pngs_to_webp "$REPO_RANKING_PANEL_DIR" "$skin_path" + convert_pngs_to_webp "$REPO_THUMBNAIL_DIR" "$skin_path" + done + + echo "[Convert PNG → WEBP Finished]" + + - name: Create OSK Files + shell: bash + run: | + echo "[OSK Creation Job Started]" + + if [ -z "${CHANGED_SKINS_FILE:-}" ] || [ ! -s "$CHANGED_SKINS_FILE" ]; then + echo "No skins changed. Skipping OSK creation." + exit 0 + fi + + mapfile -t skin_dirs < "$CHANGED_SKINS_FILE" + [ "${#skin_dirs[@]}" -eq 0 ] && { echo "No skins to process. Exiting."; exit 0; } + + sanitize_filename() { + echo "$1" | \ + tr -d '\000-\037' | \ + sed -e 's#[\\/:\*\?"<>|]#-#g' | \ + sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' + } + + FIXED_TIMESTAMP="2025-01-01 00:00:00" + SKIN_COUNT=${#skin_dirs[@]} + INDEX=1 + + for skin_path in "${skin_dirs[@]}"; do + SKIN_DIR="$DANSER_SKINS_DIR/$skin_path" + [ ! -d "$SKIN_DIR" ] && { echo "Skipping missing skin directory: $SKIN_DIR"; ((INDEX++)); continue; } + + OUTPUT_DIR="$OSK_PATH/$skin_path" + mkdir -p "$OUTPUT_DIR" + + skin_header="$skin_path" + ini_file=$(find "$SKIN_DIR" -maxdepth 1 -iname "skin.ini" | head -n1 || true) + if [ -f "$ini_file" ]; then + name_line=$(grep -i '^[[:space:]]*name:' "$ini_file" | head -n1 || true) + if [ -n "$name_line" ]; then + val="${name_line#*:}" + val="$(echo "$val" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" + sanitized="$(sanitize_filename "$val")" + [ -n "$sanitized" ] && skin_header="$sanitized" + fi + fi + + echo "" + echo "[$INDEX/$SKIN_COUNT] Processing skin: $skin_header" + + (cd "$SKIN_DIR" && find . -type f -exec touch -d "$FIXED_TIMESTAMP" {} +) + + (cd "$SKIN_DIR" && find . -type f | sort | \ + zip -rq -D -X -9 --compression-method deflate \ + "$OUTPUT_DIR/${skin_header}.osk" -@) + + echo " ✓ OSK file created at $OUTPUT_DIR/${skin_header}.osk" + INDEX=$((INDEX + 1)) + done + + echo "" + echo "[OSK Creation Job Finished — processed $SKIN_COUNT skins]" - name: Generate README + shell: bash run: | - echo "Starting README generation..." + echo "Generating README index…" + + sanitize_filename() { + echo "$1" | \ + tr -d '\000-\037' | \ + sed -e 's#[\\/:\*\?"<>|]#-#g' | \ + sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' + } + + url_encode_path() { + local IFS='/' + local parts=($1) + local encoded="" + for part in "${parts[@]}"; do + [ -n "$encoded" ] && encoded+="/" + encoded+=$(printf '%s' "$part" | jq -sRr @uri) + done + echo "$encoded" + } SKINS_JSON_FILE="${{ github.workspace }}/.gitea/workflows/skins.json" DESC_FILE=$(mktemp) - - jq -r '.descriptions | to_entries[] | "\(.key)=\(.value)"' "$SKINS_JSON_FILE" > "$DESC_FILE" - echo "---" > "$README_PATH" echo "gitea: none" >> "$README_PATH" echo "include_toc: true" >> "$README_PATH" @@ -372,186 +643,253 @@ jobs: echo "" >> "$README_PATH" echo "# Skins" >> "$README_PATH" echo "" >> "$README_PATH" - echo "This README is automatically generated using CI/CD pipelines, Danser, ImageMagick, and FFmpeg. The workflow generates gameplay previews, creates mod icons, packages .osk files, and updates the README with media and descriptions, with the Skins included in [Skins](./Skins)." >> "$README_PATH" + echo "" >> "$README_PATH" + echo "" >> "$README_PATH" + echo "**Go back to [osc/skins]($REGISTRY_URL/osc/skins)**" >> "$README_PATH" + echo "" >> "$README_PATH" + echo "**Click on the Skin name to download it, or click on the thumbnail to see more about the skin, including a video preview, screenshots, and mod icons.**" >> "$README_PATH" echo "" >> "$README_PATH" + jq -r '.descriptions | to_entries[] | "\(.key)=\(.value)"' "$SKINS_JSON_FILE" > "$DESC_FILE" + jq -r '.order[]?' "$SKINS_JSON_FILE" > order.txt + get_desc() { - key=$1 - escaped_key=$(printf '%s\n' "$key" | sed 's/[\/&]/\\&/g') - grep "^${escaped_key}=" "$DESC_FILE" | cut -d '=' -f2- + grep -F -m1 -- "$1=" "$DESC_FILE" 2>/dev/null | cut -d '=' -f2- } - ORDER_FILE=$(mktemp) - JSON_SKINS_TMP=$(mktemp) - SEEN_HEADERS_FILE=$(mktemp) - - jq -r '.order[]' "$SKINS_JSON_FILE" > "$ORDER_FILE" - cp "$ORDER_FILE" "$JSON_SKINS_TMP" - + declare -A ordered while IFS= read -r skin; do + ordered["$skin"]=1 dir="$DANSER_SKINS_DIR/$skin" - if [ ! -d "$dir" ]; then - echo "Skipping missing skin directory: $skin" - continue - fi - - ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n 1) + [ ! -d "$dir" ] && continue + ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1) skin_header="$skin" if [ -f "$ini_file" ]; then - name_line=$(grep -i '^[[:space:]]*name:' "$ini_file" | head -n 1) - if [ -n "$name_line" ]; then - skin_header=$(echo "$name_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') - fi + line=$(grep -i '^[[:space:]]*Name:' "$ini_file" | head -n1) + [ -n "$line" ] && skin_header=$(sanitize_filename "${line#*:}") fi - if grep -Fxq "$skin_header" "$SEEN_HEADERS_FILE"; then - echo "Skipping duplicate skin header from JSON order: $skin_header" - continue - fi - echo "$skin_header" >> "$SEEN_HEADERS_FILE" + raw_path="$(printf "%s/%s" "$skin" "$skin_header" | sed 's/^ *//;s/ *$//')" + base_path=$(url_encode_path "$raw_path") - escaped_img=$(echo "$skin_header.gif" | sed 's/ /%20/g') - escaped_osk=$(echo "$skin_header.osk" | sed 's/ /%20/g') - - echo "## [$skin_header]($REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/export/$escaped_osk)" >> "$README_PATH" + echo "## [$skin_header]($REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/export/${base_path}.osk)" >> "$README_PATH" echo "" >> "$README_PATH" - skin_desc=$(get_desc "$skin") - if [ -n "$skin_desc" ]; then - echo "$skin_desc" >> "$README_PATH" - echo "" >> "$README_PATH" - fi + desc=$(get_desc "$skin") + [ -n "$desc" ] && { echo "$desc" >> "$README_PATH"; echo "" >> "$README_PATH"; } - if [ -f "$ini_file" ]; then - author_line=$(grep -i '^[[:space:]]*Author:' "$ini_file" | head -n 1 || true) - if [ -n "$author_line" ]; then - author=$(echo "$author_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') - if [ -n "$author" ]; then - echo "**Author:** $author" >> "$README_PATH" - echo "" >> "$README_PATH" - fi - fi - fi - - echo "![$skin_header Gameplay](media/gameplay/$escaped_img)" >> "$README_PATH" + echo "[![$skin_header Thumbnail](media/thumbnail/${base_path}.webp)](/docs/${base_path}.md)" >> "$README_PATH" echo "" >> "$README_PATH" + done < order.txt - if [ -f "media/panel/${skin_header}.png" ]; then - escaped_panel=$(echo "${skin_header}.png" | sed 's/ /%20/g') - echo "![$skin_header Ranking Panel](media/panel/$escaped_panel)" >> "$README_PATH" - echo "" >> "$README_PATH" - fi + echo "Adding extra skins not in order.json..." - mod_icon_file="${skin_header}-mod-icons.png" - if [ -f "media/icons/$mod_icon_file" ]; then - escaped_mod=$(echo "$mod_icon_file" | sed 's/ /%20/g') - echo "![$skin_header Mods](media/icons/$escaped_mod)" >> "$README_PATH" - echo "" >> "$README_PATH" - fi - done < "$ORDER_FILE" - - find "$DANSER_SKINS_DIR" -mindepth 1 -maxdepth 1 -type d | while IFS= read -r dir; do + for dir in "$DANSER_SKINS_DIR"/*; do + [ -d "$dir" ] || continue skin=$(basename "$dir") + [[ -n "${ordered[$skin]}" ]] && continue - ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n 1) + ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1) skin_header="$skin" if [ -f "$ini_file" ]; then - name_line=$(grep -i '^[[:space:]]*name:' "$ini_file" | head -n 1) - if [ -n "$name_line" ]; then - skin_header=$(echo "$name_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') - fi + line=$(grep -i '^[[:space:]]*Name:' "$ini_file" | head -n1 2>/dev/null || true) + [ -n "$line" ] && skin_header=$(sanitize_filename "${line#*:}") fi - if grep -Fxq "$skin_header" "$SEEN_HEADERS_FILE"; then - continue - fi + raw_path="$(printf "%s/%s" "$skin" "$skin_header" | sed 's/^ *//;s/ *$//')" + base_path=$(url_encode_path "$raw_path") - if grep -Fxq "$skin" "$JSON_SKINS_TMP"; then - continue - fi - - echo "$skin_header" >> "$SEEN_HEADERS_FILE" - - escaped_img=$(echo "$skin_header.gif" | sed 's/ /%20/g') - escaped_osk=$(echo "$skin_header.osk" | sed 's/ /%20/g') - - echo "## [$skin_header]($REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/export/$escaped_osk)" >> "$README_PATH" + echo "## [$skin_header]($REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/export/${base_path}.osk)" >> "$README_PATH" echo "" >> "$README_PATH" - if [ -f "$ini_file" ]; then - author_line=$(grep -i '^[[:space:]]*Author:' "$ini_file" | head -n 1 || true) - if [ -n "$author_line" ]; then - author=$(echo "$author_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') - if [ -n "$author" ]; then - echo "**Author:** $author" >> "$README_PATH" - echo "" >> "$README_PATH" - fi - fi - fi - - echo "![$skin_header Gameplay](media/gameplay/$escaped_img)" >> "$README_PATH" + echo "[![$skin_header Thumbnail](media/thumbnail/${base_path}.webp)](/docs/${base_path}.md)" >> "$README_PATH" echo "" >> "$README_PATH" - - if [ -f "media/panel/${skin_header}.png" ]; then - escaped_panel=$(echo "${skin_header}.png" | sed 's/ /%20/g') - echo "![$skin_header Ranking Panel](media/panel/$escaped_panel)" >> "$README_PATH" - echo "" >> "$README_PATH" - fi - - mod_icon_file="${skin_header}-mod-icons.png" - if [ -f "media/icons/$mod_icon_file" ]; then - escaped_mod=$(echo "$mod_icon_file" | sed 's/ /%20/g') - echo "![$skin_header Mods](media/icons/$escaped_mod)" >> "$README_PATH" - echo "" >> "$README_PATH" - fi done - rm "$DESC_FILE" "$ORDER_FILE" "$JSON_SKINS_TMP" "$SEEN_HEADERS_FILE" - echo "# Build History" >> "$README_PATH" echo "" >> "$README_PATH" echo "| Version | Date |" >> "$README_PATH" echo "| ------- | ---- |" >> "$README_PATH" current_commit_date=$(TZ="Europe/Zurich" date -d "$(git log -1 --format=%cI)" "+%d.%m.%Y %H:%M:%S") - echo "| [\`$new_tag (Current)\`](https://git.sulejmani.xyz/arlind/skins/src/tag/$new_tag/README.md) | $current_commit_date |" >> "$README_PATH" + echo "| [\`$new_tag (Current)\`]($REGISTRY_URL/$USER_REPOSITORY/src/tag/$new_tag/README.md) | $current_commit_date |" >> "$README_PATH" - git tag --sort=-v:refname | grep -v "^$new_tag$" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | while read -r tag; do - 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\`](https://git.sulejmani.xyz/arlind/skins/src/tag/$tag/README.md) | $formatted_date |" >> "$README_PATH" + 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 + 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/README.md) | $formatted_date |" >> "$README_PATH" + done + fi + + echo "README index generated successfully." + + - name: Generate Per-Skin Pages + shell: bash + run: | + echo "Generating detailed per-skin markdown pages…" + + sanitize_filename() { + echo "$1" | \ + tr -d '\000-\037' | \ + sed -e 's#[\\/:\*\?"<>|]#-#g' | \ + sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' + } + + url_encode_path() { + local IFS='/' + local parts=($1) + local encoded="" + for part in "${parts[@]}"; do + [ -n "$encoded" ] && encoded+="/" + encoded+=$(printf '%s' "$part" | jq -sRr @uri) + done + echo "$encoded" + } + + mkdir -p "$DOC_DIR" + + for dir in "$DANSER_SKINS_DIR"/*; do + [ -d "$dir" ] || continue + + skin=$(basename "$dir") + ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1 || true) + skin_header="$skin" + + if [ -f "$ini_file" ]; then + line=$(grep -i '^[[:space:]]*Name:' "$ini_file" | head -n1 || true) + [ -n "$line" ] && skin_header=$(sanitize_filename "${line#*:}") + fi + + raw_path="${skin}/${skin_header}" + base_path=$(url_encode_path "$raw_path") + osk_url="$REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/export/${base_path}.osk" + md_file_path="${DOC_DIR}/${raw_path}.md" + + mkdir -p "$(dirname "$md_file_path")" + + video_url="$REGISTRY_URL/$USER_REPOSITORY/raw/tag/$new_tag/media/gameplay/${base_path}.mp4" + + { + echo "# [$skin_header]($osk_url)" + echo "" + echo "" + echo "" + echo "![](/media/panel/${base_path}.webp)" + echo "" + echo "![](/media/icons/${base_path}-mod-icons.webp)" + } > "$md_file_path" + + echo " → Wrote $md_file_path" done - echo "README generation completed." + echo "Per-skin markdown pages complete." + + - name: Cleanup Extra Files + shell: bash + run: | + set -euo pipefail + echo "[Cleanup Extra Files Started]" + + [ -f how-to-use.md ] && rm -f how-to-use.md + + readarray -t skins <<< "$ALL_SKINS_DIR" + + sanitize_filename() { + echo "$1" | \ + tr -d '\000-\037' | \ + sed -e 's#[\\/:\*\?"<>|]#-#g' | \ + sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' + } + + prune_dir() { + local root="$1" + local skin="$2" + local expected="$3" + + for f in "$root"/*; do + [ -f "$f" ] || continue + name="$(basename "$f")" + if printf '%s\n' "${skins[@]}" | grep -Fxq -- "$name"; then + continue + fi + echo " → Removing unexpected root file: $f" + rm -f "$f" + done + + dir="$root/$skin" + [ -d "$dir" ] || return + for f in "$dir"/*; do + [ -e "$f" ] || continue + if [[ "$(basename "$f")" != "$expected" ]]; then + echo " → Removing unexpected file: $f" + rm -f "$f" + fi + done + } + + for root in "$REPO_SCREENSHOT_DIR" "$REPO_RANKING_PANEL_DIR" "$REPO_MOD_ICONS_DIR" "$REPO_THUMBNAIL_DIR" "$OSK_PATH" "$DOC_DIR"; do + [ -d "$root" ] || continue + for dir in "$root"/*; do + [ -d "$dir" ] || continue + name="$(basename "$dir")" + if ! printf '%s\n' "${skins[@]}" | grep -Fxq -- "$name"; then + echo " → Skin '$name' deleted—removing directory $dir" + rm -rf "$dir" + fi + done + done + + for skin in "${skins[@]}"; do + header=$(sanitize_filename "$skin") + ini=$(find "$DANSER_SKINS_DIR/$skin" -maxdepth 1 -type f -iname "skin.ini" -print -quit || true) + if [[ -f "$ini" ]]; then + raw=$(grep -i '^[[:space:]]*Name:' "$ini" | head -n1 || true) + raw="${raw#*:}" + tmp_header=$(sanitize_filename "$raw") + [[ -n "$tmp_header" ]] && header="$tmp_header" + fi + + prune_dir "$REPO_SCREENSHOT_DIR" "$skin" "$header.mp4" + prune_dir "$REPO_RANKING_PANEL_DIR" "$skin" "$header.webp" + prune_dir "$REPO_MOD_ICONS_DIR" "$skin" "$header-mod-icons.webp" + prune_dir "$REPO_THUMBNAIL_DIR" "$skin" "$header.webp" + prune_dir "$OSK_PATH" "$skin" "$header.osk" + prune_dir "$DOC_DIR" "$skin" "$header.md" + done + + echo "[Cleanup Extra Files Complete]" - name: Configure Git + shell: bash run: | - echo "Configuring git user and LFS..." git config user.email "arlind@sulej.ch" git config user.name "ci-bot" - git config lfs.https://${{ secrets.CONTAINER_REGISTRY }}/arlind/skins.git/info/lfs.locksverify true - echo "Git configured." - name: Add and Commit changes + shell: bash run: | git config advice.addIgnoredFile false - echo "Staging files for commit..." - git add README.md media/gameplay/* media/panel/* media/icons/* export/* - echo "Committing changes..." + + for p in docs/ media/gameplay media/thumbnail media/panel media/icons export README.md how-to-use.md src; do + if [ -e "$p" ]; then + git add -A "$p" + fi + done + git commit -m "[ci skip] push back from pipeline" -q || echo "No changes to commit" - echo "Commit step completed." - name: Push changes and create tag + shell: bash run: | - echo "Checking branch and pushing changes..." if [ "${GITHUB_REF}" = "refs/heads/main" ]; then - echo "On main branch: pushing to origin main..." git push origin HEAD:main || echo "No changes to push" - echo "Creating and pushing tag $new_tag..." git tag "$new_tag" git push origin "$new_tag" else - echo "On branch ${GITHUB_REF_NAME}: pushing to origin ${GITHUB_REF_NAME}..." git push origin HEAD:"${GITHUB_REF_NAME}" || echo "No changes to push" fi - echo "Push step completed." diff --git a/README.md b/README.md index 32cdc76d..377d03cc 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ include_toc: true # Skins +<<<<<<< HEAD This README is automatically generated using CI/CD pipelines, Danser, ImageMagick, and FFmpeg. The workflow generates gameplay previews, creates mod icons, packages .osk files, and updates the README with media and descriptions, with the Skins included in [Skins](./Skins). ## [no](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.0.0/export/no.osk) @@ -72,9 +73,63 @@ This README is automatically generated using CI/CD pipelines, Danser, ImageMagic ![Utami (WubWoofWolf) Ranking Panel](media/panel/Utami%20(WubWoofWolf).png) ![Utami (WubWoofWolf) Mods](media/icons/Utami%20(WubWoofWolf)-mod-icons.png) +======= + + +**Go back to [osc/skins](https://git.sulejmani.xyz/osc/skins)** + +**Click on the Skin name to download it, or click on the thumbnail to see more about the skin, including a video preview, screenshots, and mod icons.** + +## [++scylla funny mix EPIC](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/%2B%2Bscylla%20funny%20mix%20EPIC/%2B%2Bscylla%20funny%20mix%20EPIC.osk) + +[![++scylla funny mix EPIC Thumbnail](media/thumbnail/%2B%2Bscylla%20funny%20mix%20EPIC/%2B%2Bscylla%20funny%20mix%20EPIC.webp)](/docs/%2B%2Bscylla%20funny%20mix%20EPIC/%2B%2Bscylla%20funny%20mix%20EPIC.md) + +## [no](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/-%20rafis%20pinkity%20edit%20by%20henry/no.osk) + +[![no Thumbnail](media/thumbnail/-%20rafis%20pinkity%20edit%20by%20henry/no.webp)](/docs/-%20rafis%20pinkity%20edit%20by%20henry/no.md) + +## [- ⊹ aia](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/-%20%E2%8A%B9%20aia%20-%20Copy/-%20%20%20%E2%8A%B9%20aia.osk) + +[![- ⊹ aia Thumbnail](media/thumbnail/-%20%E2%8A%B9%20aia%20-%20Copy/-%20%20%20%E2%8A%B9%20aia.webp)](/docs/-%20%E2%8A%B9%20aia%20-%20Copy/-%20%20%20%E2%8A%B9%20aia.md) + +## [Utami (WubWoofWolf)](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/--/Utami%20%28WubWoofWolf%29.osk) + +[![Utami (WubWoofWolf) Thumbnail](media/thumbnail/--/Utami%20%28WubWoofWolf%29.webp)](/docs/--/Utami%20%28WubWoofWolf%29.md) + +## [Aleph DT](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/Aleph%20DT/Aleph%20DT.osk) + +[![Aleph DT Thumbnail](media/thumbnail/Aleph%20DT/Aleph%20DT.webp)](/docs/Aleph%20DT/Aleph%20DT.md) + +## [Rafis but SZ](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/Rafis%20but%20SZ/Rafis%20but%20SZ.osk) + +[![Rafis but SZ Thumbnail](media/thumbnail/Rafis%20but%20SZ/Rafis%20but%20SZ.webp)](/docs/Rafis%20but%20SZ/Rafis%20but%20SZ.md) + +## [adidas for3v3r](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/_%E2%80%A2%20adidas%20for3v3r/adidas%20for3v3r.osk) + +[![adidas for3v3r Thumbnail](media/thumbnail/_%E2%80%A2%20adidas%20for3v3r/adidas%20for3v3r.webp)](/docs/_%E2%80%A2%20adidas%20for3v3r/adidas%20for3v3r.md) + +## [019](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/a%D0%BB%D1%91/019.osk) + +[![019 Thumbnail](media/thumbnail/a%D0%BB%D1%91/019.webp)](/docs/a%D0%BB%D1%91/019.md) + +## [hddthr aristia](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/hddthr_aristia/hddthr%20aristia.osk) + +[![hddthr aristia Thumbnail](media/thumbnail/hddthr_aristia/hddthr%20aristia.webp)](/docs/hddthr_aristia/hddthr%20aristia.md) + +## [prezes](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/prezes/prezes.osk) + +[![prezes Thumbnail](media/thumbnail/prezes/prezes.webp)](/docs/prezes/prezes.md) +>>>>>>> 312c74cbe1893ebb2b3313cdc9f18c22cd01082c # Build History | Version | Date | | ------- | ---- | +<<<<<<< HEAD | [`v1.0.0 (Current)`](https://git.sulejmani.xyz/arlind/skins/src/tag/v1.0.0/README.md) | 06.06.2025 12:53:02 | +======= +| [`v1.1.0 (Current)`](https://git.sulejmani.xyz/Skellers/ooga_booga/src/tag/v1.1.0/README.md) | 16.06.2025 21:12:46 | +| [`v1.0.0`](https://git.sulejmani.xyz/Skellers/ooga_booga/src/tag/v1.0.0/README.md) | 16.06.2025 10:51:47 | +>>>>>>> 312c74cbe1893ebb2b3313cdc9f18c22cd01082c diff --git a/docs/++scylla funny mix EPIC/++scylla funny mix EPIC.md b/docs/++scylla funny mix EPIC/++scylla funny mix EPIC.md new file mode 100644 index 00000000..8880b85d --- /dev/null +++ b/docs/++scylla funny mix EPIC/++scylla funny mix EPIC.md @@ -0,0 +1,8 @@ +# [++scylla funny mix EPIC](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/%2B%2Bscylla%20funny%20mix%20EPIC/%2B%2Bscylla%20funny%20mix%20EPIC.osk) + + + +![](/media/panel/%2B%2Bscylla%20funny%20mix%20EPIC/%2B%2Bscylla%20funny%20mix%20EPIC.webp) + +![](/media/icons/%2B%2Bscylla%20funny%20mix%20EPIC/%2B%2Bscylla%20funny%20mix%20EPIC-mod-icons.webp) diff --git a/docs/- rafis pinkity edit by henry/no.md b/docs/- rafis pinkity edit by henry/no.md new file mode 100644 index 00000000..8ce9700c --- /dev/null +++ b/docs/- rafis pinkity edit by henry/no.md @@ -0,0 +1,8 @@ +# [no](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/-%20rafis%20pinkity%20edit%20by%20henry/no.osk) + + + +![](/media/panel/-%20rafis%20pinkity%20edit%20by%20henry/no.webp) + +![](/media/icons/-%20rafis%20pinkity%20edit%20by%20henry/no-mod-icons.webp) diff --git a/docs/- ⊹ aia - Copy/- ⊹ aia.md b/docs/- ⊹ aia - Copy/- ⊹ aia.md new file mode 100644 index 00000000..27cbd776 --- /dev/null +++ b/docs/- ⊹ aia - Copy/- ⊹ aia.md @@ -0,0 +1,8 @@ +# [- ⊹ aia](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/-%20%E2%8A%B9%20aia%20-%20Copy/-%20%20%20%E2%8A%B9%20aia.osk) + + + +![](/media/panel/-%20%E2%8A%B9%20aia%20-%20Copy/-%20%20%20%E2%8A%B9%20aia.webp) + +![](/media/icons/-%20%E2%8A%B9%20aia%20-%20Copy/-%20%20%20%E2%8A%B9%20aia-mod-icons.webp) diff --git a/docs/--/Utami (WubWoofWolf).md b/docs/--/Utami (WubWoofWolf).md new file mode 100644 index 00000000..f3032dac --- /dev/null +++ b/docs/--/Utami (WubWoofWolf).md @@ -0,0 +1,8 @@ +# [Utami (WubWoofWolf)](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/--/Utami%20%28WubWoofWolf%29.osk) + + + +![](/media/panel/--/Utami%20%28WubWoofWolf%29.webp) + +![](/media/icons/--/Utami%20%28WubWoofWolf%29-mod-icons.webp) diff --git a/docs/Aleph DT/Aleph DT.md b/docs/Aleph DT/Aleph DT.md new file mode 100644 index 00000000..4e40fc81 --- /dev/null +++ b/docs/Aleph DT/Aleph DT.md @@ -0,0 +1,8 @@ +# [Aleph DT](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/Aleph%20DT/Aleph%20DT.osk) + + + +![](/media/panel/Aleph%20DT/Aleph%20DT.webp) + +![](/media/icons/Aleph%20DT/Aleph%20DT-mod-icons.webp) diff --git a/docs/Rafis but SZ/Rafis but SZ.md b/docs/Rafis but SZ/Rafis but SZ.md new file mode 100644 index 00000000..7144ba6d --- /dev/null +++ b/docs/Rafis but SZ/Rafis but SZ.md @@ -0,0 +1,8 @@ +# [Rafis but SZ](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/Rafis%20but%20SZ/Rafis%20but%20SZ.osk) + + + +![](/media/panel/Rafis%20but%20SZ/Rafis%20but%20SZ.webp) + +![](/media/icons/Rafis%20but%20SZ/Rafis%20but%20SZ-mod-icons.webp) diff --git a/docs/_• adidas for3v3r/adidas for3v3r.md b/docs/_• adidas for3v3r/adidas for3v3r.md new file mode 100644 index 00000000..738182b9 --- /dev/null +++ b/docs/_• adidas for3v3r/adidas for3v3r.md @@ -0,0 +1,8 @@ +# [adidas for3v3r](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/_%E2%80%A2%20adidas%20for3v3r/adidas%20for3v3r.osk) + + + +![](/media/panel/_%E2%80%A2%20adidas%20for3v3r/adidas%20for3v3r.webp) + +![](/media/icons/_%E2%80%A2%20adidas%20for3v3r/adidas%20for3v3r-mod-icons.webp) diff --git a/docs/aлё/019.md b/docs/aлё/019.md new file mode 100644 index 00000000..b3324e33 --- /dev/null +++ b/docs/aлё/019.md @@ -0,0 +1,8 @@ +# [019](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/a%D0%BB%D1%91/019.osk) + + + +![](/media/panel/a%D0%BB%D1%91/019.webp) + +![](/media/icons/a%D0%BB%D1%91/019-mod-icons.webp) diff --git a/docs/hddthr_aristia/hddthr aristia.md b/docs/hddthr_aristia/hddthr aristia.md new file mode 100644 index 00000000..2c9d462e --- /dev/null +++ b/docs/hddthr_aristia/hddthr aristia.md @@ -0,0 +1,8 @@ +# [hddthr aristia](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/hddthr_aristia/hddthr%20aristia.osk) + + + +![](/media/panel/hddthr_aristia/hddthr%20aristia.webp) + +![](/media/icons/hddthr_aristia/hddthr%20aristia-mod-icons.webp) diff --git a/docs/prezes/prezes.md b/docs/prezes/prezes.md new file mode 100644 index 00000000..a43a67ba --- /dev/null +++ b/docs/prezes/prezes.md @@ -0,0 +1,8 @@ +# [prezes](https://git.sulejmani.xyz/Skellers/ooga_booga/media/tag/v1.1.0/export/prezes/prezes.osk) + + + +![](/media/panel/prezes/prezes.webp) + +![](/media/icons/prezes/prezes-mod-icons.webp) diff --git a/export/++scylla funny mix EPIC/++scylla funny mix EPIC.osk b/export/++scylla funny mix EPIC/++scylla funny mix EPIC.osk new file mode 100644 index 00000000..4b5d30c8 --- /dev/null +++ b/export/++scylla funny mix EPIC/++scylla funny mix EPIC.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef38fba5d7c1a5c09c68c429f6f1c2f2135bd6cab8e3555edf9dde7fed604748 +size 6799355 diff --git a/export/- rafis pinkity edit by henry/no.osk b/export/- rafis pinkity edit by henry/no.osk new file mode 100644 index 00000000..9455cd64 --- /dev/null +++ b/export/- rafis pinkity edit by henry/no.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:851fd356a04205a818389d07770a8793c62d8cddddb63ac1dc7eb1953d6ce53e +size 14147485 diff --git a/export/- ⊹ aia - Copy/- ⊹ aia.osk b/export/- ⊹ aia - Copy/- ⊹ aia.osk new file mode 100644 index 00000000..6b3601cc --- /dev/null +++ b/export/- ⊹ aia - Copy/- ⊹ aia.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:553fe0e71170441ea805115ce0ec3e092141f52494b9eabca877c3b0141714a2 +size 22546878 diff --git a/export/--/Utami (WubWoofWolf).osk b/export/--/Utami (WubWoofWolf).osk new file mode 100644 index 00000000..86bf765b --- /dev/null +++ b/export/--/Utami (WubWoofWolf).osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b58220ff6716031c718b235c69561978ecea8c43cb34ee38ea5e59e077de32a1 +size 7499961 diff --git a/export/Aleph DT/Aleph DT.osk b/export/Aleph DT/Aleph DT.osk new file mode 100644 index 00000000..bb844504 --- /dev/null +++ b/export/Aleph DT/Aleph DT.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da331af63691e55eeb4dbae0b279d2ccc62aeeff97865f9eb03cc8705abb0aa8 +size 3459603 diff --git a/export/Rafis but SZ/Rafis but SZ.osk b/export/Rafis but SZ/Rafis but SZ.osk new file mode 100644 index 00000000..306eb88f --- /dev/null +++ b/export/Rafis but SZ/Rafis but SZ.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38d13e97dd612e0780219876eb384310a7b2c979cad8b3c58e5edba118d1ebe2 +size 21207751 diff --git a/export/_• adidas for3v3r/adidas for3v3r.osk b/export/_• adidas for3v3r/adidas for3v3r.osk new file mode 100644 index 00000000..40fe512e --- /dev/null +++ b/export/_• adidas for3v3r/adidas for3v3r.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3daf54e3e508d9b80deec88f3f3a20945ddfeba8881c9e924fdcb136b13d087 +size 7201426 diff --git a/export/aлё/019.osk b/export/aлё/019.osk new file mode 100644 index 00000000..00e4b217 --- /dev/null +++ b/export/aлё/019.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abd6747157e96c2b22a4927d2ac0ad0efb1bbedeb0031ce77c36a4944506fb6a +size 5347725 diff --git a/export/hddthr_aristia/hddthr aristia.osk b/export/hddthr_aristia/hddthr aristia.osk new file mode 100644 index 00000000..a93d1bbd --- /dev/null +++ b/export/hddthr_aristia/hddthr aristia.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fada0863ad71195e8bf9cb639f9d9e48efbc081dc79043facf77a035ed9d5ac +size 5947262 diff --git a/export/prezes/prezes.osk b/export/prezes/prezes.osk new file mode 100644 index 00000000..8410fe23 --- /dev/null +++ b/export/prezes/prezes.osk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48e12394187767585ef20fed249a4d55ffa355b649bfd52b46b98d237e399613 +size 1276110 diff --git a/how-to-use.md b/how-to-use.md deleted file mode 100644 index f0525eb4..00000000 --- a/how-to-use.md +++ /dev/null @@ -1,208 +0,0 @@ ---- - -gitea: none -include_toc: true - ---- - -# How to Use This Repository - -If anything is unclear, just shoot me a message on Discord. - -## 1. Create Your Account on git.sulejmani.xyz - -(If you don't want to share your mail with me DM me on Discord) - -Sign up here: -[https://git.sulejmani.xyz/user/sign\_up](https://git.sulejmani.xyz/user/sign_up) - -![Register](/src/docs/register.png) - -Check your email and click the confirmation link to activate your account. - -![Check Mail](/src/docs/check_mail.png) -![Activation Email](/src/docs/activation_mail.png) - -Then confirm your password to complete the process. - -![Activate Account](/src/docs/activate_account.png) - ---- - -## 2. Generate an Access Token - -Go to [https://git.sulejmani.xyz/](https://git.sulejmani.xyz/) and open your **Settings**. - -![Navigate Settings](/src/docs/navigate_settings.png) - -Under the **Applications** section, create a new token. - -* Check all permissions (as shown in the image) -* Give it a clear and recognizable name - -![Generate Token](/src/docs/applications_generate_token.png) - -Once the token is generated, **copy and save it securely**, you won’t be able to see it again. - -![Copy Token](/src/docs/copy_token.png) - ---- - -## 3. Create a New Repository - -Still on [https://git.sulejmani.xyz/](https://git.sulejmani.xyz/), click the **+** icon in the top right corner to create a new repo. - -![Start Creating New Repo](/src/docs/start_create_new_repo.png) - -* Name it however you like -* Use `skins-template` as the template -* Enable all template items - -You now have your own copy of the template repo. - -![Template Repo](/src/docs/template_repo.png) - ---- - -## 4. Set Up Secrets for Deployment - -Go to your repository's **Settings**. - -![Navigate Repo Settings](/src/docs/navigate_repository_settings.png) - -Then under **Actions** open the **Secrets** tab and add these two: - -| Secret Name | Secret Value | -| -------------------- | -------------------------- | -| `TOKEN` | The token you just created | -| `CONTAINER_REGISTRY` | `git.sulejmani.xyz` | - -![Add Secret 1](/src/docs/secret1.png) -![Add Secret 2](/src/docs/secret2.png) - ---- - -## 5. Clone the Repository - -If you don’t have Git installed, download it here: -👉 [https://git-scm.com/downloads/win](https://git-scm.com/downloads/win) - -Choose where to clone the repo (e.g. `D:/git/`) and run: - -```bash -git config --global user.name "Your Name" -git config --global user.email "you@example.com" - -git lfs install - -git clone https://git.sulejmani.xyz/{yourusername}/{yourrepositoryname}.git -``` - ---- - -## 6. Prepare Your Skins - -In your cloned repo, open `hardlink-songs-folder.bat`. - -Edit the source and target paths. For example, if: - -* Your osu! skins are in `E:\osu!\skins` -* Your repo is in `D:\git\skins` - -Then update the line on the script like this: - -```bat -robocopy "E:\osu!\skins" "D:\git\skins\Skins" /MIR /COPYALL /SEC /B /XJ /DCOPY:T /J -``` - - -Run the batch file by double-clicking it. - ---- - -## 7. Change Skin Order, add descriptions, and ignore Skins. - -### Skin Order -This is optional, but recommended. In the `workflows` folder, open `skins.json`. - -Edit the order and descriptions as you like. - -here's an example: - -```json -{ - "order": [ - "- Barely still Jace", - "- Jace" - ], - "descriptions": { - "- Barely still Jace": "My main skin.", - "- Jace": "My secondary skin, only really used for EZ." - } -} -``` - -Make sure the order matches the skins folder name in the `Skins` folder. - -### Ignore Skins - -There is a .gitignore file in the root of the repo. You can add any skins you don't want to be uploaded. - -Here's an example: - -``` -*WhiteCat* -*Vaxei* -``` -So in this example if a Skin has WhiteCat or Vaxei in the name, it will be ignored. - ---- - -## 8. Upload Your Skins - -Open a terminal (cmd or PowerShell) in your repo directory: - -```cmd -cd D:\git\skins # update this to your actual path -``` - -Then run: - -```bash -git add . -git commit -m "Adding skins" -git config --global credential.helper cache -git push -``` - -Your skins will now be uploaded. - ---- - -## 9. Monitor Upload Progress - -Go to your repo's **Actions** tab. - -![navigate-actions](/src/docs/navigate_actions.png) - -You’ll see the workflow progress there. - -![progress](/src/docs/progress.png) - -If something goes wrong, check the logs—or just ping me on Discord. - ---- - -## 10. Update Skins in the Future - -To update your skins later: - -1. Re-run `hardlink-songs-folder.bat` -2. Run the same upload commands: - -```bash -git pull -git add . -git commit -m "Updating skins" -git push -``` diff --git a/media/gameplay/++scylla funny mix EPIC/++scylla funny mix EPIC.mp4 b/media/gameplay/++scylla funny mix EPIC/++scylla funny mix EPIC.mp4 new file mode 100644 index 00000000..3c6d6c40 Binary files /dev/null and b/media/gameplay/++scylla funny mix EPIC/++scylla funny mix EPIC.mp4 differ diff --git a/media/gameplay/- rafis pinkity edit by henry/no.mp4 b/media/gameplay/- rafis pinkity edit by henry/no.mp4 new file mode 100644 index 00000000..83667920 Binary files /dev/null and b/media/gameplay/- rafis pinkity edit by henry/no.mp4 differ diff --git a/media/gameplay/- ⊹ aia - Copy/- ⊹ aia.mp4 b/media/gameplay/- ⊹ aia - Copy/- ⊹ aia.mp4 new file mode 100644 index 00000000..42522d01 Binary files /dev/null and b/media/gameplay/- ⊹ aia - Copy/- ⊹ aia.mp4 differ diff --git a/media/gameplay/--/Utami (WubWoofWolf).mp4 b/media/gameplay/--/Utami (WubWoofWolf).mp4 new file mode 100644 index 00000000..3b8970d8 Binary files /dev/null and b/media/gameplay/--/Utami (WubWoofWolf).mp4 differ diff --git a/media/gameplay/Aleph DT/Aleph DT.mp4 b/media/gameplay/Aleph DT/Aleph DT.mp4 new file mode 100644 index 00000000..d568cb91 Binary files /dev/null and b/media/gameplay/Aleph DT/Aleph DT.mp4 differ diff --git a/media/gameplay/Rafis but SZ/Rafis but SZ.mp4 b/media/gameplay/Rafis but SZ/Rafis but SZ.mp4 new file mode 100644 index 00000000..3d442b1f Binary files /dev/null and b/media/gameplay/Rafis but SZ/Rafis but SZ.mp4 differ diff --git a/media/gameplay/_• adidas for3v3r/adidas for3v3r.mp4 b/media/gameplay/_• adidas for3v3r/adidas for3v3r.mp4 new file mode 100644 index 00000000..005acfb7 Binary files /dev/null and b/media/gameplay/_• adidas for3v3r/adidas for3v3r.mp4 differ diff --git a/media/gameplay/aлё/019.mp4 b/media/gameplay/aлё/019.mp4 new file mode 100644 index 00000000..c5554ffd Binary files /dev/null and b/media/gameplay/aлё/019.mp4 differ diff --git a/media/gameplay/hddthr_aristia/hddthr aristia.mp4 b/media/gameplay/hddthr_aristia/hddthr aristia.mp4 new file mode 100644 index 00000000..3f755eb8 Binary files /dev/null and b/media/gameplay/hddthr_aristia/hddthr aristia.mp4 differ diff --git a/media/gameplay/prezes/prezes.mp4 b/media/gameplay/prezes/prezes.mp4 new file mode 100644 index 00000000..5ef84c94 Binary files /dev/null and b/media/gameplay/prezes/prezes.mp4 differ diff --git a/media/icons/++scylla funny mix EPIC/++scylla funny mix EPIC-mod-icons.webp b/media/icons/++scylla funny mix EPIC/++scylla funny mix EPIC-mod-icons.webp new file mode 100644 index 00000000..0b6ee01a Binary files /dev/null and b/media/icons/++scylla funny mix EPIC/++scylla funny mix EPIC-mod-icons.webp differ diff --git a/media/icons/- rafis pinkity edit by henry/no-mod-icons.webp b/media/icons/- rafis pinkity edit by henry/no-mod-icons.webp new file mode 100644 index 00000000..27a08887 Binary files /dev/null and b/media/icons/- rafis pinkity edit by henry/no-mod-icons.webp differ diff --git a/media/icons/- ⊹ aia - Copy/- ⊹ aia-mod-icons.webp b/media/icons/- ⊹ aia - Copy/- ⊹ aia-mod-icons.webp new file mode 100644 index 00000000..0b6ee01a Binary files /dev/null and b/media/icons/- ⊹ aia - Copy/- ⊹ aia-mod-icons.webp differ diff --git a/media/icons/--/Utami (WubWoofWolf)-mod-icons.webp b/media/icons/--/Utami (WubWoofWolf)-mod-icons.webp new file mode 100644 index 00000000..9660d868 Binary files /dev/null and b/media/icons/--/Utami (WubWoofWolf)-mod-icons.webp differ diff --git a/media/icons/Aleph DT/Aleph DT-mod-icons.webp b/media/icons/Aleph DT/Aleph DT-mod-icons.webp new file mode 100644 index 00000000..0b6ee01a Binary files /dev/null and b/media/icons/Aleph DT/Aleph DT-mod-icons.webp differ diff --git a/media/icons/Rafis but SZ/Rafis but SZ-mod-icons.webp b/media/icons/Rafis but SZ/Rafis but SZ-mod-icons.webp new file mode 100644 index 00000000..ff8805cf Binary files /dev/null and b/media/icons/Rafis but SZ/Rafis but SZ-mod-icons.webp differ diff --git a/media/icons/_• adidas for3v3r/adidas for3v3r-mod-icons.webp b/media/icons/_• adidas for3v3r/adidas for3v3r-mod-icons.webp new file mode 100644 index 00000000..0b6ee01a Binary files /dev/null and b/media/icons/_• adidas for3v3r/adidas for3v3r-mod-icons.webp differ diff --git a/media/icons/aлё/019-mod-icons.webp b/media/icons/aлё/019-mod-icons.webp new file mode 100644 index 00000000..e50e5dd4 Binary files /dev/null and b/media/icons/aлё/019-mod-icons.webp differ diff --git a/media/icons/hddthr_aristia/hddthr aristia-mod-icons.webp b/media/icons/hddthr_aristia/hddthr aristia-mod-icons.webp new file mode 100644 index 00000000..0b6ee01a Binary files /dev/null and b/media/icons/hddthr_aristia/hddthr aristia-mod-icons.webp differ diff --git a/media/icons/prezes/prezes-mod-icons.webp b/media/icons/prezes/prezes-mod-icons.webp new file mode 100644 index 00000000..e8fa0c35 Binary files /dev/null and b/media/icons/prezes/prezes-mod-icons.webp differ diff --git a/media/panel/++scylla funny mix EPIC/++scylla funny mix EPIC.webp b/media/panel/++scylla funny mix EPIC/++scylla funny mix EPIC.webp new file mode 100644 index 00000000..dcbd46c5 Binary files /dev/null and b/media/panel/++scylla funny mix EPIC/++scylla funny mix EPIC.webp differ diff --git a/media/panel/- rafis pinkity edit by henry/no.webp b/media/panel/- rafis pinkity edit by henry/no.webp new file mode 100644 index 00000000..f791cb01 Binary files /dev/null and b/media/panel/- rafis pinkity edit by henry/no.webp differ diff --git a/media/panel/- ⊹ aia - Copy/- ⊹ aia.webp b/media/panel/- ⊹ aia - Copy/- ⊹ aia.webp new file mode 100644 index 00000000..c9f1aa99 Binary files /dev/null and b/media/panel/- ⊹ aia - Copy/- ⊹ aia.webp differ diff --git a/media/panel/--/Utami (WubWoofWolf).webp b/media/panel/--/Utami (WubWoofWolf).webp new file mode 100644 index 00000000..4a620b3a Binary files /dev/null and b/media/panel/--/Utami (WubWoofWolf).webp differ diff --git a/media/panel/Aleph DT/Aleph DT.webp b/media/panel/Aleph DT/Aleph DT.webp new file mode 100644 index 00000000..4d09a664 Binary files /dev/null and b/media/panel/Aleph DT/Aleph DT.webp differ diff --git a/media/panel/Rafis but SZ/Rafis but SZ.webp b/media/panel/Rafis but SZ/Rafis but SZ.webp new file mode 100644 index 00000000..1fecc3da Binary files /dev/null and b/media/panel/Rafis but SZ/Rafis but SZ.webp differ diff --git a/media/panel/_• adidas for3v3r/adidas for3v3r.webp b/media/panel/_• adidas for3v3r/adidas for3v3r.webp new file mode 100644 index 00000000..bd8a9870 Binary files /dev/null and b/media/panel/_• adidas for3v3r/adidas for3v3r.webp differ diff --git a/media/panel/aлё/019.webp b/media/panel/aлё/019.webp new file mode 100644 index 00000000..ad556a1e Binary files /dev/null and b/media/panel/aлё/019.webp differ diff --git a/media/panel/hddthr_aristia/hddthr aristia.webp b/media/panel/hddthr_aristia/hddthr aristia.webp new file mode 100644 index 00000000..4c5fe40a Binary files /dev/null and b/media/panel/hddthr_aristia/hddthr aristia.webp differ diff --git a/media/panel/prezes/prezes.webp b/media/panel/prezes/prezes.webp new file mode 100644 index 00000000..07ce4224 Binary files /dev/null and b/media/panel/prezes/prezes.webp differ diff --git a/media/thumbnail/++scylla funny mix EPIC/++scylla funny mix EPIC.webp b/media/thumbnail/++scylla funny mix EPIC/++scylla funny mix EPIC.webp new file mode 100644 index 00000000..d50d9e2d Binary files /dev/null and b/media/thumbnail/++scylla funny mix EPIC/++scylla funny mix EPIC.webp differ diff --git a/media/thumbnail/- rafis pinkity edit by henry/no.webp b/media/thumbnail/- rafis pinkity edit by henry/no.webp new file mode 100644 index 00000000..03266fe1 Binary files /dev/null and b/media/thumbnail/- rafis pinkity edit by henry/no.webp differ diff --git a/media/thumbnail/- ⊹ aia - Copy/- ⊹ aia.webp b/media/thumbnail/- ⊹ aia - Copy/- ⊹ aia.webp new file mode 100644 index 00000000..9ee5f9fc Binary files /dev/null and b/media/thumbnail/- ⊹ aia - Copy/- ⊹ aia.webp differ diff --git a/media/thumbnail/--/Utami (WubWoofWolf).webp b/media/thumbnail/--/Utami (WubWoofWolf).webp new file mode 100644 index 00000000..36499ceb Binary files /dev/null and b/media/thumbnail/--/Utami (WubWoofWolf).webp differ diff --git a/media/thumbnail/Aleph DT/Aleph DT.webp b/media/thumbnail/Aleph DT/Aleph DT.webp new file mode 100644 index 00000000..4fa7358f Binary files /dev/null and b/media/thumbnail/Aleph DT/Aleph DT.webp differ diff --git a/media/thumbnail/Rafis but SZ/Rafis but SZ.webp b/media/thumbnail/Rafis but SZ/Rafis but SZ.webp new file mode 100644 index 00000000..2cd8173e Binary files /dev/null and b/media/thumbnail/Rafis but SZ/Rafis but SZ.webp differ diff --git a/media/thumbnail/_• adidas for3v3r/adidas for3v3r.webp b/media/thumbnail/_• adidas for3v3r/adidas for3v3r.webp new file mode 100644 index 00000000..f11f1cd6 Binary files /dev/null and b/media/thumbnail/_• adidas for3v3r/adidas for3v3r.webp differ diff --git a/media/thumbnail/aлё/019.webp b/media/thumbnail/aлё/019.webp new file mode 100644 index 00000000..b3c7bfdf Binary files /dev/null and b/media/thumbnail/aлё/019.webp differ diff --git a/media/thumbnail/hddthr_aristia/hddthr aristia.webp b/media/thumbnail/hddthr_aristia/hddthr aristia.webp new file mode 100644 index 00000000..3d62e942 Binary files /dev/null and b/media/thumbnail/hddthr_aristia/hddthr aristia.webp differ diff --git a/media/thumbnail/prezes/prezes.webp b/media/thumbnail/prezes/prezes.webp new file mode 100644 index 00000000..3f46f9fd Binary files /dev/null and b/media/thumbnail/prezes/prezes.webp differ diff --git a/src/docs/activate_account.png b/src/docs/activate_account.png deleted file mode 100644 index ed3c9e96..00000000 --- a/src/docs/activate_account.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e532dd0df21476c0ec62044db40fa87a6cffe33ba99ce529398f8f39714b6120 -size 6055 diff --git a/src/docs/activation_mail.png b/src/docs/activation_mail.png deleted file mode 100644 index fa6de360..00000000 --- a/src/docs/activation_mail.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ebdedb876ba05cb5a11859b3355eee4d95c36276cb229c7f639c113af03ea80 -size 22430 diff --git a/src/docs/applications_generate_token.png b/src/docs/applications_generate_token.png deleted file mode 100644 index fbcad29d..00000000 --- a/src/docs/applications_generate_token.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:42b7eaae1f8b744dfe92981d93c7922fe5e8d3d135deb5fd63e4aace98dd4a17 -size 45322 diff --git a/src/docs/check_mail.png b/src/docs/check_mail.png deleted file mode 100644 index 29e645c2..00000000 --- a/src/docs/check_mail.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89cbb3ecd96b09abc505d2963b346732a9dc1e1412aece53d985181be8ba0f9f -size 12213 diff --git a/src/docs/copy_token.png b/src/docs/copy_token.png deleted file mode 100644 index ca3c8cba..00000000 --- a/src/docs/copy_token.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:66d83736439b2447c14b7d03a9ba2e772ef4edbbc9f608ca86be148dda352e5e -size 4944 diff --git a/src/docs/navigate_actions.png b/src/docs/navigate_actions.png deleted file mode 100644 index 1fda0177..00000000 --- a/src/docs/navigate_actions.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8d289bea0186a2f3268039f7d6167d74335315c4f21d30f74775bcdecc031a7c -size 9434 diff --git a/src/docs/navigate_repository_settings.png b/src/docs/navigate_repository_settings.png deleted file mode 100644 index 202316cf..00000000 --- a/src/docs/navigate_repository_settings.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4a96a295fa040cae33475bc5545650ce2bf029366a7d93c144311783c0922f25 -size 44376 diff --git a/src/docs/navigate_settings.png b/src/docs/navigate_settings.png deleted file mode 100644 index 7dec6653..00000000 --- a/src/docs/navigate_settings.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a260d51b388e627956c0c54c14fd8d1850ccf8f764cba95eeeb2ea86a8152ead -size 9112 diff --git a/src/docs/progress.png b/src/docs/progress.png deleted file mode 100644 index e8a6eea3..00000000 --- a/src/docs/progress.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6986dc37eba9debcffa81e9f49591c983c36086e8e92ecd29f789902d6856398 -size 37308 diff --git a/src/docs/register.png b/src/docs/register.png deleted file mode 100644 index 7193104f..00000000 --- a/src/docs/register.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d65c065bdaff8057bb8589b8df03507164b5f64b6df59276a2802b8ba191d8c -size 10172 diff --git a/src/docs/secret1.png b/src/docs/secret1.png deleted file mode 100644 index 8dafdf8e..00000000 --- a/src/docs/secret1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0fb5b87fbd730fa16745214d521dc3dbf8047af34b29c9b1c1314fc2cde4f8b0 -size 10308 diff --git a/src/docs/secret2.png b/src/docs/secret2.png deleted file mode 100644 index 18b4d245..00000000 --- a/src/docs/secret2.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:58a28ca2f539fc58ce01d9ce60c51d68ba6e56c7810f5b141a8699f178a67c46 -size 11140 diff --git a/src/docs/start_create_new_repo.png b/src/docs/start_create_new_repo.png deleted file mode 100644 index 7a062d3b..00000000 --- a/src/docs/start_create_new_repo.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8f0689f8fead37373232a8979e33b09d00fa6c567c4d398f969f8fb881d4bbb -size 7012 diff --git a/src/docs/template_repo.png b/src/docs/template_repo.png deleted file mode 100644 index cd93a109..00000000 --- a/src/docs/template_repo.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4aad005e3a03cf9fa4088c785ce06a54ef71007fc1eb83f4e0c85adfbc1ad5a -size 41423