fix: update tv .nfo handling
updated TV .nfo handling
This commit is contained in:
+12
-42
@@ -1,4 +1,4 @@
|
||||
name: Docker Build & Deploy (DEV)
|
||||
name: Local Docker Build (Dev)
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -15,12 +15,13 @@ jobs:
|
||||
run: |
|
||||
echo "Current workspace: $(pwd)"
|
||||
|
||||
# Clean workspace first
|
||||
# Clean workspace and temp directory first
|
||||
rm -rf * .git* 2>/dev/null || true
|
||||
rm -rf /tmp/repo 2>/dev/null || true
|
||||
|
||||
# Clone the repository since Gitea runner doesn't auto-checkout
|
||||
echo "Cloning repository..."
|
||||
git clone 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/jskala/NFOguard.git /tmp/repo
|
||||
cp -r /tmp/repo/* .
|
||||
cp -r /tmp/repo/.* . 2>/dev/null || true
|
||||
rm -rf /tmp/repo
|
||||
@@ -95,6 +96,8 @@ jobs:
|
||||
echo "Building DEV image with layer caching..."
|
||||
docker build \
|
||||
$CACHE_ARGS \
|
||||
--build-arg GIT_BRANCH=dev \
|
||||
--build-arg BUILD_SOURCE=gitea \
|
||||
--tag nfoguard:dev \
|
||||
--tag nfoguard:dev-${{ github.sha }} \
|
||||
--tag "$CACHE_IMAGE" \
|
||||
@@ -135,42 +138,9 @@ jobs:
|
||||
echo "❌ DEV local registry login failed - continuing to Docker Hub"
|
||||
fi
|
||||
|
||||
- name: Push DEV to Docker Hub
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
run: |
|
||||
echo "=== Pushing DEV image to Docker Hub ==="
|
||||
|
||||
# Use temporary config directory to avoid permission issues
|
||||
export DOCKER_CONFIG=/tmp/docker-config-dev-hub
|
||||
mkdir -p $DOCKER_CONFIG
|
||||
|
||||
if echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker --config $DOCKER_CONFIG login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin; then
|
||||
echo "✅ Docker Hub login successful"
|
||||
|
||||
DOCKER_HUB_REPO="sbcrumb/nfoguard"
|
||||
|
||||
# Tag and push dev image
|
||||
docker tag nfoguard:dev "$DOCKER_HUB_REPO:dev"
|
||||
docker tag nfoguard:dev "$DOCKER_HUB_REPO:dev-${{ github.sha }}"
|
||||
|
||||
echo "=== Pushing DEV tags to Docker Hub ==="
|
||||
if timeout 300 docker --config $DOCKER_CONFIG push "$DOCKER_HUB_REPO:dev"; then
|
||||
echo "✅ DEV tag pushed to Docker Hub"
|
||||
|
||||
if timeout 180 docker --config $DOCKER_CONFIG push "$DOCKER_HUB_REPO:dev-${{ github.sha }}"; then
|
||||
echo "✅ DEV SHA tag pushed to Docker Hub"
|
||||
else
|
||||
echo "⚠️ DEV SHA tag push failed"
|
||||
fi
|
||||
else
|
||||
echo "❌ Failed to push DEV to Docker Hub"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "🎉 DEV image available on Docker Hub!"
|
||||
echo "📦 DEV image: sbcrumb/nfoguard:dev"
|
||||
else
|
||||
echo "❌ Docker Hub login failed for DEV push"
|
||||
exit 1
|
||||
fi
|
||||
echo ""
|
||||
echo "🎉 DEV build completed successfully!"
|
||||
echo ""
|
||||
echo "📦 Available DEV images:"
|
||||
echo " Local only: nfoguard:dev"
|
||||
echo " Local SHA: nfoguard:dev-${{ github.sha }}"
|
||||
Reference in New Issue
Block a user