fix: Update workflow configuration for current deployment setup
- Align repository references with current infrastructure - Update Docker registry namespace consistency - Ensure proper CI/CD pipeline functionality
This commit is contained in:
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
# Clone the repository since Gitea runner doesn't auto-checkout
|
||||
echo "Cloning repository..."
|
||||
git clone --branch dev http://${{ secrets.username }}:${{ secrets.token }}@192.168.253.221:3000/jskala/NFOguard.git /tmp/repo
|
||||
git clone --branch dev http://${{ secrets.username }}:${{ secrets.token }}@192.168.253.221:3000/sbcrumb/nfoguard.git /tmp/repo
|
||||
cp -r /tmp/repo/* .
|
||||
cp -r /tmp/repo/.* . 2>/dev/null || true
|
||||
rm -rf /tmp/repo
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
run: |
|
||||
echo "Building DEV Docker image with layer caching..."
|
||||
LOCAL_REGISTRY="192.168.253.221:3000"
|
||||
CACHE_IMAGE="$LOCAL_REGISTRY/jskala/nfoguard:dev-buildcache"
|
||||
CACHE_IMAGE="$LOCAL_REGISTRY/sbcrumb/nfoguard:dev-buildcache"
|
||||
|
||||
# Clear any existing Docker configs to prevent permission issues
|
||||
unset DOCKER_CONFIG
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
# Check if DEV cache image exists and pull it
|
||||
echo "Checking for existing DEV cache image..."
|
||||
CACHE_ARGS=""
|
||||
if curl -s "http://$LOCAL_REGISTRY/v2/jskala/nfoguard/manifests/dev-buildcache" > /dev/null 2>&1; then
|
||||
if curl -s "http://$LOCAL_REGISTRY/v2/sbcrumb/nfoguard/manifests/dev-buildcache" > /dev/null 2>&1; then
|
||||
echo "✅ DEV cache manifest found, pulling image..."
|
||||
if docker pull "$CACHE_IMAGE" 2>/dev/null; then
|
||||
echo "✅ DEV cache image pulled successfully"
|
||||
@@ -119,18 +119,18 @@ jobs:
|
||||
echo "✅ DEV Login succeeded"
|
||||
|
||||
# Tag for local registry
|
||||
docker tag nfoguard:dev "$LOCAL_REGISTRY/jskala/nfoguard:dev"
|
||||
docker tag nfoguard:dev "$LOCAL_REGISTRY/jskala/nfoguard:dev-${{ github.sha }}"
|
||||
docker tag nfoguard:dev "$LOCAL_REGISTRY/sbcrumb/nfoguard:dev"
|
||||
docker tag nfoguard:dev "$LOCAL_REGISTRY/sbcrumb/nfoguard:dev-${{ github.sha }}"
|
||||
|
||||
# Push DEV images
|
||||
echo "=== Pushing DEV cache image ==="
|
||||
timeout 60 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/jskala/nfoguard:dev-buildcache" && echo "✅ DEV cache pushed" || echo "⚠️ DEV cache push failed"
|
||||
timeout 60 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/sbcrumb/nfoguard:dev-buildcache" && echo "✅ DEV cache pushed" || echo "⚠️ DEV cache push failed"
|
||||
|
||||
echo "=== Pushing DEV latest tag ==="
|
||||
if timeout 120 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/jskala/nfoguard:dev"; then
|
||||
if timeout 120 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/sbcrumb/nfoguard:dev"; then
|
||||
echo "✅ DEV tag pushed successfully"
|
||||
|
||||
if timeout 60 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/jskala/nfoguard:dev-${{ github.sha }}"; then
|
||||
if timeout 60 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/sbcrumb/nfoguard:dev-${{ github.sha }}"; then
|
||||
echo "✅ DEV SHA tag pushed successfully"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user