Use runtime base to break gateway build cycle
Some checks failed
Build and Deploy Gateway / build-and-push (push) Has been cancelled
Build and Deploy Gateway / deploy (push) Has been cancelled

This commit is contained in:
2026-05-09 10:46:13 +03:00
parent e16f401dc5
commit d12b0c01fc
8 changed files with 90 additions and 18 deletions

View File

@@ -7,7 +7,7 @@ on:
env:
DEPLOY_PATH: /opt/vpn-proxy
BASE_IMAGE: mirror.gcr.io/library/debian:bookworm-slim
BASE_IMAGE: vpn-proxy-runtime-base:bookworm-slim
SINGBOX_VERSION: 1.12.13
jobs:
@@ -39,6 +39,11 @@ jobs:
echo "Base image: ${{ env.BASE_IMAGE }}"
echo "Docker context: $(docker context show 2>/dev/null || true)"
docker info 2>/dev/null | sed -n '/HTTP Proxy:/p;/HTTPS Proxy:/p;/Name:/p'
docker image inspect "${{ env.BASE_IMAGE }}" >/dev/null || {
echo "Runtime base image ${{ env.BASE_IMAGE }} is missing on lxc-107."
echo "Seed it once on 107 with: ./scripts/build-runtime-base.sh"
exit 1
}
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY_HOST" -u "${{ gitea.actor }}" --password-stdin
DOCKER_BUILDKIT=1 docker build \
@@ -46,6 +51,8 @@ jobs:
--pull=false \
--build-arg BASE_IMAGE="${{ env.BASE_IMAGE }}" \
--build-arg SINGBOX_VERSION="${{ env.SINGBOX_VERSION }}" \
--build-arg INSTALL_RUNTIME_DEPS=false \
--build-arg INSTALL_SINGBOX=false \
-t "${IMAGE}:latest" \
-t "${IMAGE}:${{ gitea.sha }}" \
.