From e716ba819721c94fc79e96fccc5e28b5b844e45c Mon Sep 17 00:00:00 2001 From: Riccardo Zambelli Gnocco Date: Fri, 29 May 2026 13:38:51 +0200 Subject: [PATCH 1/6] checkout correct branch --- .github/workflows/tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f996800..8c1573a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -25,6 +25,8 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v6 + with: + ref: ${{ github.event.repository.default_branch }} - name: Check for latest id: save-var From 0fa6cbb223a8144c65d4360f1bd084d8b75166f7 Mon Sep 17 00:00:00 2001 From: Riccardo Zambelli Gnocco Date: Mon, 1 Jun 2026 09:33:45 +0200 Subject: [PATCH 2/6] checkout correct branch --- .github/workflows/tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8c1573a..a24cd3d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -45,6 +45,8 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v6 + with: + ref: ${{ github.event.repository.default_branch }} - name: Create server folder run: mkdir server From 0caf65c3563402c67b783cbffcf11ca3264cc34f Mon Sep 17 00:00:00 2001 From: Riccardo Zambelli Gnocco Date: Mon, 1 Jun 2026 09:55:32 +0200 Subject: [PATCH 3/6] get the previous version not the second-to-last one --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a24cd3d..a3ba5ad 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -52,7 +52,7 @@ jobs: run: mkdir server - name: Get previous version - run: echo "PREVIOUS_VERSION=$(curl -sSL "https://piston-meta.mojang.com/mc/game/version_manifest.json" | jq -cr '[.versions[] | select(.type == "release")] [1] .id')" >> $GITHUB_ENV + run: echo "PREVIOUS_VERSION=curl -sSL "https://piston-meta.mojang.com/mc/game/version_manifest.json" | jq -r --arg target "26.1.1" '[.versions[] | select(.type == "release") | .id] | index($target) as $idx | if $idx then .[$idx + 1] else empty end'" >> $GITHUB_ENV - name: Start server for world creation run: docker run --rm --name mc -e EULA=TRUE -e UID="$(id -u)" -e VERSION=${{ github.event.inputs.VERSION }} -e ENABLE_AUTOSTOP=TRUE -e AUTOSTOP_TIMEOUT_INIT=5 -e MEMORY=8G -v ./server:/data itzg/minecraft-server:latest --forceUpgrade From 6953bd624c0139e15fe0d81d02b8b472a52144f2 Mon Sep 17 00:00:00 2001 From: Riccardo Zambelli Gnocco Date: Mon, 1 Jun 2026 09:56:33 +0200 Subject: [PATCH 4/6] fix target version --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a3ba5ad..2c02411 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -52,7 +52,7 @@ jobs: run: mkdir server - name: Get previous version - run: echo "PREVIOUS_VERSION=curl -sSL "https://piston-meta.mojang.com/mc/game/version_manifest.json" | jq -r --arg target "26.1.1" '[.versions[] | select(.type == "release") | .id] | index($target) as $idx | if $idx then .[$idx + 1] else empty end'" >> $GITHUB_ENV + run: echo "PREVIOUS_VERSION=curl -sSL "https://piston-meta.mojang.com/mc/game/version_manifest.json" | jq -r --arg target "${{ github.event.inputs.VERSION }}" '[.versions[] | select(.type == "release") | .id] | index($target) as $idx | if $idx then .[$idx + 1] else empty end'" >> $GITHUB_ENV - name: Start server for world creation run: docker run --rm --name mc -e EULA=TRUE -e UID="$(id -u)" -e VERSION=${{ github.event.inputs.VERSION }} -e ENABLE_AUTOSTOP=TRUE -e AUTOSTOP_TIMEOUT_INIT=5 -e MEMORY=8G -v ./server:/data itzg/minecraft-server:latest --forceUpgrade From 3afa5a7397c26e5d91ce776caf73ed0129e764f8 Mon Sep 17 00:00:00 2001 From: Riccardo Zambelli Gnocco Date: Mon, 1 Jun 2026 09:59:53 +0200 Subject: [PATCH 5/6] fix sub shell --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2c02411..7c9008d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -52,7 +52,7 @@ jobs: run: mkdir server - name: Get previous version - run: echo "PREVIOUS_VERSION=curl -sSL "https://piston-meta.mojang.com/mc/game/version_manifest.json" | jq -r --arg target "${{ github.event.inputs.VERSION }}" '[.versions[] | select(.type == "release") | .id] | index($target) as $idx | if $idx then .[$idx + 1] else empty end'" >> $GITHUB_ENV + run: echo "PREVIOUS_VERSION=$(curl -sSL "https://piston-meta.mojang.com/mc/game/version_manifest.json" | jq -r --arg target "${{ github.event.inputs.VERSION }}" '[.versions[] | select(.type == "release") | .id] | index($target) as $idx | if $idx then .[$idx + 1] else empty end'" >> $GITHUB_ENV - name: Start server for world creation run: docker run --rm --name mc -e EULA=TRUE -e UID="$(id -u)" -e VERSION=${{ github.event.inputs.VERSION }} -e ENABLE_AUTOSTOP=TRUE -e AUTOSTOP_TIMEOUT_INIT=5 -e MEMORY=8G -v ./server:/data itzg/minecraft-server:latest --forceUpgrade From 561fd8f81db8f9e78dae64916390305e08278551 Mon Sep 17 00:00:00 2001 From: Riccardo Zambelli Gnocco Date: Mon, 1 Jun 2026 10:49:06 +0200 Subject: [PATCH 6/6] fix sub shell --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7c9008d..0b52fb7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -52,7 +52,7 @@ jobs: run: mkdir server - name: Get previous version - run: echo "PREVIOUS_VERSION=$(curl -sSL "https://piston-meta.mojang.com/mc/game/version_manifest.json" | jq -r --arg target "${{ github.event.inputs.VERSION }}" '[.versions[] | select(.type == "release") | .id] | index($target) as $idx | if $idx then .[$idx + 1] else empty end'" >> $GITHUB_ENV + run: echo "PREVIOUS_VERSION=$(curl -sSL "https://piston-meta.mojang.com/mc/game/version_manifest.json" | jq -r --arg target "${{ github.event.inputs.VERSION }}" '[.versions[] | select(.type == "release") | .id] | index($target) as $idx | if $idx then .[$idx + 1] else empty end')" >> $GITHUB_ENV - name: Start server for world creation run: docker run --rm --name mc -e EULA=TRUE -e UID="$(id -u)" -e VERSION=${{ github.event.inputs.VERSION }} -e ENABLE_AUTOSTOP=TRUE -e AUTOSTOP_TIMEOUT_INIT=5 -e MEMORY=8G -v ./server:/data itzg/minecraft-server:latest --forceUpgrade