diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 327e6f9b..c31c5340 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -256,24 +256,33 @@ jobs: tags: | type=raw,value=nightly - - name: Login to Forgejo registry - uses: https://github.com/docker/login-action@v3 - with: - registry: git.huckle.dev - username: ${{ github.actor }} - password: ${{ secrets.REGISTRY_TOKEN }} - - - name: Build and push image + - name: Build image to OCI tarball uses: https://github.com/docker/build-push-action@v6 with: context: . file: docker/dedicated-server/Dockerfile - push: true + outputs: type=oci,dest=/tmp/image-${{ matrix.variant }}.tar tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | MC_RUNTIME_DIR=runtime + - name: Install crane + run: | + set -euo pipefail + VER=v0.20.2 + curl -fsSL "https://github.com/google/go-containerregistry/releases/download/${VER}/go-containerregistry_Linux_x86_64.tar.gz" \ + | tar -xz -C /usr/local/bin crane + crane version + + - name: Push image with chunked upload + env: + REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} + run: | + set -euo pipefail + echo "$REGISTRY_TOKEN" | crane auth login git.huckle.dev -u "${{ github.actor }}" --password-stdin + crane push --chunk-size 52428800 /tmp/image-${{ matrix.variant }}.tar ${{ steps.meta.outputs.tags }} + release-server: name: Release Server needs: build-server