add bukkit
All checks were successful
Build and Push Minecraft Docker Images on Debian-base update / poll-debian-base-and-detect-changes (push) Successful in 54s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push neoforged (push) Successful in 1m50s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push bukkit (push) Successful in 2m45s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-bukkit (push) Successful in 58s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-fabric (push) Successful in 14s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push forge (push) Successful in 3m0s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push fabric (push) Successful in 3m13s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-vanilla (push) Successful in 15s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-neoforged (push) Successful in 15s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-forge (push) Successful in 1m18s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push vanilla (push) Successful in 1m50s
Build and Push Minecraft Docker Images on Debian-base update / generate-changelogs (push) Successful in 7s
Build and Push Minecraft Docker Images on Debian-base update / generate-build-info (push) Successful in 2m28s

This commit is contained in:
2025-12-19 06:24:15 -08:00
parent 8e961a2a70
commit 4f13b9dba1
5 changed files with 61 additions and 75 deletions

View File

@@ -21,7 +21,7 @@ env:
IMAGE_REPO_MINECRAFT: minecraft IMAGE_REPO_MINECRAFT: minecraft
IMAGE_TAG_DEBIAN: bookworm IMAGE_TAG_DEBIAN: bookworm
DIGEST_FILE: .cache/debian-base.digest DIGEST_FILE: .cache/debian-base.digest
VERSIONS: vanilla testing-vanilla fabric testing-fabric neoforged testing-neoforged forge testing-forge VERSIONS: vanilla testing-vanilla fabric testing-fabric neoforged testing-neoforged forge testing-forge bukkit testing-bukkit
jobs: jobs:
poll-debian-base-and-detect-changes: poll-debian-base-and-detect-changes:
@@ -149,7 +149,7 @@ jobs:
needs.poll-debian-base-and-detect-changes.outputs.new_versions != '' needs.poll-debian-base-and-detect-changes.outputs.new_versions != ''
strategy: strategy:
matrix: matrix:
version: [vanilla, testing-vanilla, fabric, testing-fabric, neoforged, testing-neoforged, forge, testing-forge] version: [vanilla, testing-vanilla, fabric, testing-fabric, neoforged, testing-neoforged, forge, testing-forge, bukkit, testing-bukkit]
name: Build and Push ${{ matrix.version }} name: Build and Push ${{ matrix.version }}
steps: steps:
- name: Checkout repo - name: Checkout repo

View File

@@ -2,33 +2,30 @@
# Copyright (c) 2022 fithwum # Copyright (c) 2022 fithwum
# All rights reserved # All rights reserved
VERSION_CHECK=$(curl -s "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json" | grep -Pom 1 '"url": "\K[^"]*'$MC_VERSION'.json') MC_DIR=/MCserver
MC_SERVER_FILE=$(curl -s $VERSION_CHECK | jq --raw-output '.downloads.server.url')
MC_RUN_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/vanilla/run.sh
rm -fr /MCserver/MCserver_*.jar # Main Install Links
rm -fr /MCserver/run_*.sh INSTALLER_FILE=https://cdn.getbukkit.org/craftbukkit/craftbukkit-$MC_VERSION.jar
MC_RUN_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/bukkit/run.sh
# Main install (Debian). # Main install (Debian).
# Check for server files and download if needed. # Check for server files and download if needed.
if [ -e /MCserver/MCserver-$MC_VERSION.jar ] if [ -e $MC_DIR/craftbukkit-$MC_VERSION.jar ]
then then
echo " " echo " "
echo "INFO ! MCserver-$MC_VERSION.jar found starting now." echo "INFO ! craftbukkit-$MC_VERSION.jar found starting now."
else else
echo " " echo " "
echo "WARNING ! MCserver-$MC_VERSION.jar is out of date/missing ... will download now." echo "WARNING ! craftbukkit-$MC_VERSION.jar is out of date/missing ... will download now."
echo " " echo " "
echo "INFO ! Cleaning old files." echo "INFO ! Cleaning old files."
mkdir /MCserver/old-server-versions/ cd $MC_DIR
mv /MCserver/MCserver-*.jar /MCserver/old-server-versions/ rm -fr craftbukkit-*.jar run-*.sh
mv /MCserver/run-*.sh /MCserver/old-server-versions/ wget --no-cache --show-progress --progress=bar:force:noscroll $INSTALLER_FILE -O craftbukkit-$MC_VERSION.jar
wget --no-cache --show-progress --progress=bar:force:noscroll $MC_SERVER_FILE -O /MCserver/MCserver-$MC_VERSION.jar chmod +x craftbukkit-$MC_VERSION.jar
chmod +x /MCserver/MCserver-$MC_VERSION.jar cd ..
fi fi
sleep 1
# Looking for run-${MC_VERSION}.sh # Looking for run-${MC_VERSION}.sh
if [ -e /MCserver/run-$MC_VERSION.sh ] if [ -e /MCserver/run-$MC_VERSION.sh ]
then then
@@ -41,15 +38,13 @@ if [ -e /MCserver/run-$MC_VERSION.sh ]
chmod +x /MCserver/run-$MC_VERSION.sh chmod +x /MCserver/run-$MC_VERSION.sh
fi fi
sleep 1
# Check for EULA # Check for EULA
if [ ! -f /MCserver/eula.txt ]; then if [ ! -f $MC_DIR/eula.txt ]; then
: :
else else
if [ "$ACCEPT_EULA" == "false" ]; then if [ "$ACCEPT_EULA" == "false" ]; then
if grep -rq 'eula=true' /MCserver/eula.txt; then if grep -rq 'eula=true' $MC_DIR/eula.txt; then
sed -i '/eula=true/c\eula=false' /MCserver/eula.txt sed -i '/eula=true/c\eula=false' $MC_DIR/eula.txt
fi fi
echo " " echo " "
echo "WARNING ! EULA not accepted, you must accept the EULA" echo "WARNING ! EULA not accepted, you must accept the EULA"
@@ -58,20 +53,19 @@ else
fi fi
fi fi
sleep 1 if [ ! -f $MC_DIR/eula.txt ]; then
if [ ! -f /MCserver/eula.txt ]; then
echo " " echo " "
echo "WARNING ! EULA not found please stand by..." echo "WARNING ! EULA not found please stand by..."
sleep 5 sleep 5
fi fi
if [ "$ACCEPT_EULA" == "true" ]; then if [ "$ACCEPT_EULA" == "true" ]; then
if grep -rq 'eula=false' /MCserver/eula.txt; then if grep -rq 'eula=false' $MC_DIR/eula.txt; then
sed -i '/eula=false/c\eula=true' /MCserver/eula.txt sed -i '/eula=false/c\eula=true' $MC_DIR/eula.txt
echo " " echo " "
echo "INFO ! EULA accepted, server restarting, please wait..." echo "INFO ! EULA accepted, server restarting, please wait..."
sleep 1 sleep 1
exec /MCserver/run-$MC_VERSION.sh --dataPath=/MCserver cd $MC_DIR
exec ./run-$MC_VERSION-$FORGE_VERSION.sh nogui
exit 0 exit 0
fi fi
elif [ "$ACCEPT_EULA" == "false" ]; then elif [ "$ACCEPT_EULA" == "false" ]; then
@@ -84,20 +78,21 @@ else
echo "WARNING ! Something went wrong, please check EULA variable" echo "WARNING ! Something went wrong, please check EULA variable"
fi fi
sleep 1
echo "INFO ! Setting game port." echo "INFO ! Setting game port."
sed -i '/server-port='*'/c\server-port='$GAME_PORT'' /MCserver/server.properties if [ -f $MC_DIR/server.properties ]; then
sleep 1 sed -i '/server-port='*'/c\server-port='$GAME_PORT'' $MC_DIR/server.properties
fi
# Set permissions. # Set permissions.
chown 99:100 -R /MCserver chown 99:100 -R $MC_DIR
chmod 777 -R /MCserver chmod 777 -R $MC_DIR
sleep 1 sleep 1
# Run Minecraft server. # Run Minecraft server.
echo " " echo " "
echo "INFO ! Starting Minecraft Server $MC_VERSION" echo "INFO ! Starting Minecraft Server $MC_VERSION"
exec /MCserver/run-$MC_VERSION.sh --dataPath=/MCserver cd $MC_DIR
exec ./run-$MC_VERSION.sh nogui
exit exit

View File

@@ -3,7 +3,7 @@
# All rights reserved # All rights reserved
cd /MCserver cd /MCserver
JAR=./MCserver-*.jar JAR=./craftbukkit-*.jar
while [ true ]; do while [ true ]; do
java -Xmx$XMX_SIZE -Xms$XMS_SIZE -Xmn$XMN_SIZE -jar $JAR nogui java -Xmx$XMX_SIZE -Xms$XMS_SIZE -Xmn$XMN_SIZE -jar $JAR nogui

View File

@@ -1,38 +1,32 @@
#!/bin/bash #!/bin/bash
# Copyright (c) 2020 fithwum # Copyright (c) 2022 fithwum
# All rights reserved # All rights reserved
# Display setup MC_DIR=/MCserver
#export DISPLAY=0
VERSION_CHECK=$(curl -s "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json" | grep -Pom 1 '"url": "\K[^"]*'$MC_VERSION'.json') # Main Install Links
MC_SERVER_FILE=$(curl -s $VERSION_CHECK | jq --raw-output '.downloads.server.url') INSTALLER_FILE=https://cdn.getbukkit.org/craftbukkit/craftbukkit-$MC_VERSION.jar
MC_RUN_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/run.sh MC_RUN_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/bukkit/run.sh
rm -fr /MCserver/MCserver_*.jar
rm -fr /MCserver/run_*.sh
# Main install (Debian). # Main install (Debian).
# Check for files in /MCserver and download if needed. # Check for server files and download if needed.
if [ -e /MCserver/MCserver-$MC_VERSION.jar ] if [ -e $MC_DIR/craftbukkit-$MC_VERSION.jar ]
then then
echo " " echo " "
echo "INFO ! MCserver-$MC_VERSION.jar found starting now." echo "INFO ! craftbukkit-$MC_VERSION.jar found starting now."
else else
echo " " echo " "
echo "WARNING ! MCserver-$MC_VERSION.jar is out of date/missing ... will download now." echo "WARNING ! craftbukkit-$MC_VERSION.jar is out of date/missing ... will download now."
echo " " echo " "
echo "INFO ! Cleaning old files." echo "INFO ! Cleaning old files."
mkdir /MCserver/old-server-versions/ cd $MC_DIR
mv /MCserver/MCserver-*.jar /MCserver/old-server-versions/ rm -fr craftbukkit-*.jar run-*.sh
mv /MCserver/run-*.sh /MCserver/old-server-versions/ wget --no-cache --show-progress --progress=bar:force:noscroll $INSTALLER_FILE -O craftbukkit-$MC_VERSION.jar
wget --no-cache --show-progress --progress=bar:force:noscroll $MC_SERVER_FILE -O /MCserver/MCserver-$MC_VERSION.jar chmod +x craftbukkit-$MC_VERSION.jar
chmod +x /MCserver/MCserver-$MC_VERSION.jar cd ..
fi fi
sleep 1 # Looking for run-${MC_VERSION}.sh
# Looking for run.sh
if [ -e /MCserver/run-$MC_VERSION.sh ] if [ -e /MCserver/run-$MC_VERSION.sh ]
then then
echo " " echo " "
@@ -44,15 +38,13 @@ if [ -e /MCserver/run-$MC_VERSION.sh ]
chmod +x /MCserver/run-$MC_VERSION.sh chmod +x /MCserver/run-$MC_VERSION.sh
fi fi
sleep 1
# Check for EULA # Check for EULA
if [ ! -f /MCserver/eula.txt ]; then if [ ! -f $MC_DIR/eula.txt ]; then
: :
else else
if [ "$ACCEPT_EULA" == "false" ]; then if [ "$ACCEPT_EULA" == "false" ]; then
if grep -rq 'eula=true' /MCserver/eula.txt; then if grep -rq 'eula=true' $MC_DIR/eula.txt; then
sed -i '/eula=true/c\eula=false' /MCserver/eula.txt sed -i '/eula=true/c\eula=false' $MC_DIR/eula.txt
fi fi
echo " " echo " "
echo "WARNING ! EULA not accepted, you must accept the EULA" echo "WARNING ! EULA not accepted, you must accept the EULA"
@@ -61,20 +53,19 @@ else
fi fi
fi fi
sleep 1 if [ ! -f $MC_DIR/eula.txt ]; then
if [ ! -f /MCserver/eula.txt ]; then
echo " " echo " "
echo "WARNING ! EULA not found please stand by..." echo "WARNING ! EULA not found please stand by..."
sleep 5 sleep 5
fi fi
if [ "$ACCEPT_EULA" == "true" ]; then if [ "$ACCEPT_EULA" == "true" ]; then
if grep -rq 'eula=false' /MCserver/eula.txt; then if grep -rq 'eula=false' $MC_DIR/eula.txt; then
sed -i '/eula=false/c\eula=true' /MCserver/eula.txt sed -i '/eula=false/c\eula=true' $MC_DIR/eula.txt
echo " " echo " "
echo "INFO ! EULA accepted, server restarting, please wait..." echo "INFO ! EULA accepted, server restarting, please wait..."
sleep 1 sleep 1
exec /MCserver/run-$MC_VERSION.sh --dataPath=/MCserver cd $MC_DIR
exec ./run-$MC_VERSION-$FORGE_VERSION.sh nogui
exit 0 exit 0
fi fi
elif [ "$ACCEPT_EULA" == "false" ]; then elif [ "$ACCEPT_EULA" == "false" ]; then
@@ -87,21 +78,21 @@ else
echo "WARNING ! Something went wrong, please check EULA variable" echo "WARNING ! Something went wrong, please check EULA variable"
fi fi
sleep 1
echo "INFO ! Setting game port." echo "INFO ! Setting game port."
sed -i '/server-port='*'/c\server-port='$GAME_PORT'' /MCserver/server.properties if [ -f $MC_DIR/server.properties ]; then
sleep 1 sed -i '/server-port='*'/c\server-port='$GAME_PORT'' $MC_DIR/server.properties
fi
# Set permissions. # Set permissions.
chown 99:100 -R /MCserver chown 99:100 -R $MC_DIR
chmod 777 -R /MCserver chmod 777 -R $MC_DIR
sleep 1 sleep 1
# Run Minecraft server. # Run Minecraft server.
echo " " echo " "
echo "INFO ! Starting Minecraft Server $MC_VERSION" echo "INFO ! Starting Minecraft Server $MC_VERSION"
exec /MCserver/run-$MC_VERSION.sh --dataPath=/MCserver cd $MC_DIR
#screen -dmS mcserver /MCserver/run-$MC_VERSION.sh --dataPath=/MCserver exec ./run-$MC_VERSION.sh nogui
exit exit

View File

@@ -3,7 +3,7 @@
# All rights reserved # All rights reserved
cd /MCserver cd /MCserver
JAR=./MCserver-*.jar JAR=./craftbukkit-*.jar
# # Check if a screen session is already running # # Check if a screen session is already running
# if screen -list | grep -q "MCserver"; then # if screen -list | grep -q "MCserver"; then