mirror of
https://git.revela.dev/itsRevela/LCE-Revelations.git
synced 2026-05-21 19:24:55 +00:00
ci: push docker images via crane with chunked uploads
This commit is contained in:
27
.github/workflows/nightly.yml
vendored
27
.github/workflows/nightly.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user