feat: add registry deploy-on-push scenario

This commit is contained in:
2026-04-28 19:47:21 +00:00
commit 733b56398c
9 changed files with 10092 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y ca-certificates curl git docker.io openssl
if [ -d /serve.zone ]; then
chown -R vagrant:vagrant /serve.zone
fi
systemctl enable --now docker
usermod -aG docker vagrant || true
if ! command -v node >/dev/null 2>&1; then
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
fi
corepack enable
corepack prepare pnpm@10.7.0 --activate
swarm_state="$(docker info --format '{{.Swarm.LocalNodeState}}' 2>/dev/null || true)"
if [ "${swarm_state}" = "inactive" ]; then
docker swarm init --advertise-addr 127.0.0.1
fi
docker pull caddy:2-alpine
docker pull node:22-trixie-slim