diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index a87ca428..bba785c8 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -23,6 +23,7 @@ on: jobs: docker-buildx: + if: github.repository == 'itzg/docker-minecraft-server' runs-on: ubuntu-20.04 env: CACHE_NAME: java11 diff --git a/.github/workflows/generate-toc.yml b/.github/workflows/generate-toc.yml index 104e8f3f..19e259e2 100644 --- a/.github/workflows/generate-toc.yml +++ b/.github/workflows/generate-toc.yml @@ -7,6 +7,7 @@ on: - README.md jobs: generate: + if: github.repository == 'itzg/docker-minecraft-server' runs-on: ubuntu-latest timeout-minutes: 5 steps: diff --git a/.github/workflows/merge-variants.yml b/.github/workflows/merge-variants.yml new file mode 100644 index 00000000..5f539825 --- /dev/null +++ b/.github/workflows/merge-variants.yml @@ -0,0 +1,20 @@ +name: Merge image variants +on: + push: + branches: + - master +jobs: + merge: + if: github.repository == 'itzg/docker-minecraft-server' + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v2.3.4 + with: + # fetch all history for merging operations + fetch-depth: 0 + - name: Run docker-versions-create + run: | + git config --add user.name "${GITHUB_ACTOR:-Github Actions}" + git config --add user.email "actions@github.com" + ./docker-versions-create.sh -b diff --git a/README.md b/README.md index 378df37a..63980cab 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + @@ -450,15 +450,18 @@ An [Airplane](https://github.com/TECHNOVE/Airplane) server, which is a fork of T -e TYPE=AIRPLANE -> **NOTE** only `VERSION=LATEST` is supported +> NOTE: The `VERSION` variable is used to select an Airplane branch to download from. The available options are "LATEST" "1.16" "1.17" and "PURPUR" + +> NOTE: The 1.17 branch is currently in beta. Use at your own risk! Extra variables: +- `AIRPLANE_BUILD=lastSuccessfulBuild` : set a specific Airplane build to use - `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded - `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the [Flare](https://blog.airplane.gg/flare) profiler ### Running a Purpur server -A [Purpur](https://purpur.pl3x.net/) server, which is "a drop-in replacement for Paper servers designed for configurability, new fun and exciting gameplay features, and high performance built on top of Tuinity.". +A [Purpur](https://purpur.pl3x.net/) server, which is "a drop-in replacement for Paper servers designed for configurability, new fun and exciting gameplay features, and high performance built on top of Tuinity." -e TYPE=PURPUR @@ -1291,7 +1294,7 @@ disable that by passing `-e GUI=FALSE`. ### Stop Duration -When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By defaul it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds. +When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By default it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds. ## Autopause diff --git a/start-deployAirplane b/start-deployAirplane index 0ce0b35d..dae242bb 100644 --- a/start-deployAirplane +++ b/start-deployAirplane @@ -5,23 +5,30 @@ IFS=$'\n\t' . ${SCRIPTS:-/}start-utils isDebugging && set -x -JAVA_VER=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1) - -if [ "${JAVA_VER}" = "8" ]; then - JDK=8 -else - JDK=11 -fi - -if [ "${VERSION}" != "LATEST" ]; then - log "ERROR: Airplane server type only supports VERSION=LATEST" +if [ "${VERSION}" != "LATEST" ] && [ "${VERSION}" != "1.16" ] && [ "${VERSION}" != "1.17" ] && [ "${VERSION}" != "PURPUR" ]; then + log "ERROR: Airplane server type only supports VERSION=LATEST, VERSION=1.16, VERSION=1.17 or VERSION=PURPUR. Note that these are branches, not #.#.# versions." exit 1 fi -export SERVER=airplane-${VANILLA_VERSION}-jdk${JDK}.jar +: ${AIRPLANE_BUILD:=lastSuccessfulBuild} + +if [ "${VERSION}" = "LATEST" ] || [ "${VERSION}" = "1.16" ]; then + AIRPLANE_BRANCH="1.16" +fi + +if [ "${VERSION}" = "1.17" ]; then + AIRPLANE_BRANCH="1.17" + log "Airplane 1.17 is in beta. Use at your own risk!" +fi + +if [ "${VERSION}" = "PURPUR" ]; then + AIRPLANE_BRANCH="PURPUR-1.16" +fi + +export SERVER=airplane-${AIRPLANE_BRANCH}-${AIRPLANE_BUILD}.jar if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then - downloadUrl="https://dl.airplane.gg/latest/Airplane-JDK${JDK}/launcher-airplane.jar" + downloadUrl="https://ci.tivy.ca/job/Airplane-${AIRPLANE_BRANCH}/${AIRPLANE_BUILD}/artifact/launcher-airplane.jar" log "Downloading Airplane from $downloadUrl ..." curl -fsSL -o "$SERVER" "$downloadUrl" if [ ! -f "$SERVER" ]; then