when: branch: [main, high-performance] event: push matrix: SERVICE: - gateway - users - companies - job_seekers - customers - payments - employees - photographers - makeup_artists - tutors - developers - video_editors - graphic_designers - social_media_managers - fitness_trainers - catering_services - ugc_content_creators - cron steps: - name: detect-changes image: alpine/git commands: - apk add --no-cache bash - | #!/bin/bash set -e CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD || echo "") SERVICE_PATH=$(echo "${SERVICE}" | tr '_' '-') SHARED_CHANGED=false if echo "$CHANGED_FILES" | grep -q "^crates/"; then SHARED_CHANGED=true echo "⚠️ Shared crates changed" fi SERVICE_CHANGED=false if echo "$CHANGED_FILES" | grep -q "^apps/${SERVICE_PATH}/"; then SERVICE_CHANGED=true echo "✅ Service ${SERVICE} changed" fi if [ "$SHARED_CHANGED" = "true" ] || [ "$SERVICE_CHANGED" = "true" ]; then echo "🚀 Building ${SERVICE}" exit 0 else echo "⏭️ Skipping ${SERVICE}" exit 78 fi - name: build-and-push image: woodpeckerci/plugin-docker-buildx:5.0.0 settings: registry: ghcr.io repo: ghcr.io/traceworks2023/nxtgauge-rust-${SERVICE} context: . # Use simple Dockerfile for now dockerfile: Dockerfile.simple build_args: - SERVICE_NAME=${SERVICE} tags: - ${CI_COMMIT_SHA} - latest - high-performance-latest username: from_secret: GHCR_USERNAME password: from_secret: GHCR_TOKEN platforms: linux/amd64