feat: Add version-gitea tags to main branch builds
Local Docker Build (Dev) / build-dev (push) Successful in 11s

Updated main workflow to create version-gitea tagged images
(e.g. 1.7.0-gitea) alongside the standard latest tag.

This provides clear identification that the image came from
the Gitea build system and includes the version number for
easy tracking.

Main branch images will now be available as:
- sbcrumb/nfoguard:latest (standard)
- sbcrumb/nfoguard:1.7.0-gitea (versioned Gitea build)
This commit is contained in:
2025-09-24 08:39:49 -04:00
parent 99ffc08c9b
commit 03a71527b4
+15
View File
@@ -97,11 +97,15 @@ jobs:
# Build with cache (if available) # Build with cache (if available)
echo "Building with layer caching..." echo "Building with layer caching..."
VERSION=$(cat VERSION 2>/dev/null || echo "unknown")
echo "Building version: $VERSION"
docker build \ docker build \
$CACHE_ARGS \ $CACHE_ARGS \
--build-arg GIT_BRANCH=main \ --build-arg GIT_BRANCH=main \
--build-arg BUILD_SOURCE=gitea \ --build-arg BUILD_SOURCE=gitea \
--tag nfoguard:latest \ --tag nfoguard:latest \
--tag nfoguard:${VERSION}-gitea \
--tag nfoguard:${{ github.sha }} \ --tag nfoguard:${{ github.sha }} \
--tag "$CACHE_IMAGE" \ --tag "$CACHE_IMAGE" \
. .
@@ -141,7 +145,9 @@ jobs:
echo "✅ Login succeeded with direct method" echo "✅ Login succeeded with direct method"
# Tag for local registry (cache image already tagged in build step) # Tag for local registry (cache image already tagged in build step)
VERSION=$(cat VERSION 2>/dev/null || echo "unknown")
docker tag nfoguard:latest "$LOCAL_REGISTRY/sbcrumb/nfoguard:latest" docker tag nfoguard:latest "$LOCAL_REGISTRY/sbcrumb/nfoguard:latest"
docker tag nfoguard:${VERSION}-gitea "$LOCAL_REGISTRY/sbcrumb/nfoguard:${VERSION}-gitea"
docker tag nfoguard:latest "$LOCAL_REGISTRY/sbcrumb/nfoguard:${{ github.sha }}" docker tag nfoguard:latest "$LOCAL_REGISTRY/sbcrumb/nfoguard:${{ github.sha }}"
echo "Pushing to LOCAL registry (gigabit speed!)..." echo "Pushing to LOCAL registry (gigabit speed!)..."
@@ -154,6 +160,11 @@ jobs:
if timeout 120 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/sbcrumb/nfoguard:latest"; then if timeout 120 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/sbcrumb/nfoguard:latest"; then
echo "✅ Latest tag pushed successfully to LOCAL registry" echo "✅ Latest tag pushed successfully to LOCAL registry"
echo "=== Pushing version-gitea tag ==="
if timeout 60 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/sbcrumb/nfoguard:${VERSION}-gitea"; then
echo "✅ Version-gitea tag pushed successfully: ${VERSION}-gitea"
fi
echo "=== Pushing SHA tag to LOCAL IP ===" echo "=== Pushing SHA tag to LOCAL IP ==="
if timeout 60 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/sbcrumb/nfoguard:${{ github.sha }}"; then if timeout 60 docker --config $DOCKER_CONFIG push "$LOCAL_REGISTRY/sbcrumb/nfoguard:${{ github.sha }}"; then
echo "✅ SHA tag pushed successfully to LOCAL registry" echo "✅ SHA tag pushed successfully to LOCAL registry"
@@ -183,10 +194,14 @@ jobs:
echo "" echo ""
echo "🎉 Local build completed successfully!" echo "🎉 Local build completed successfully!"
echo "" echo ""
VERSION=$(cat VERSION 2>/dev/null || echo "unknown")
echo "📦 Available images:" echo "📦 Available images:"
echo " Local Docker: nfoguard:latest" echo " Local Docker: nfoguard:latest"
echo " Version tag: nfoguard:${VERSION}-gitea"
echo " Local SHA: nfoguard:${{ github.sha }}" echo " Local SHA: nfoguard:${{ github.sha }}"
echo " Local Gitea: 192.168.253.221:3000/sbcrumb/nfoguard:latest" echo " Local Gitea: 192.168.253.221:3000/sbcrumb/nfoguard:latest"
echo ""
echo "🐳 Pull with: docker pull 192.168.253.221:3000/sbcrumb/nfoguard:${VERSION}-gitea"
deploy: deploy:
needs: build needs: build