rdev/scripts/build-push.sh
jordan d4eb41589f fix: Use ghcr.io and build for amd64
- Switch from GCP Artifact Registry to GitHub Container Registry
- Build images for linux/amd64 (k3s node architecture)
- Use PVC for Claude config instead of secret (auth persists across restarts)
- Remove credential secret dependency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 20:04:34 -07:00

39 lines
826 B
Bash
Executable File

#!/bin/bash
# Build and push claudebox image to GitHub Container Registry
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
# Image configuration
REGISTRY="ghcr.io/orchard9"
IMAGE_NAME="rdev-claudebox"
VERSION="${1:-latest}"
IMAGE_TAG="$REGISTRY/$IMAGE_NAME:$VERSION"
echo "Building claudebox image..."
echo "Image: $IMAGE_TAG"
echo ""
cd "$PROJECT_ROOT"
# Build the image for linux/amd64 (k3s nodes are amd64)
docker build --platform linux/amd64 -t "$IMAGE_TAG" -t "$REGISTRY/$IMAGE_NAME:latest" .
echo ""
echo "Pushing to GitHub Container Registry..."
# Push both tags
docker push "$IMAGE_TAG"
docker push "$REGISTRY/$IMAGE_NAME:latest"
echo ""
echo "Done!"
echo ""
echo "Image pushed: $IMAGE_TAG"
echo ""
echo "To deploy, run:"
echo " ./scripts/deploy.sh"