2026-04-09 00:09:04 +02:00
|
|
|
when:
|
2026-04-10 05:17:56 +02:00
|
|
|
branch: [main, high-performance]
|
2026-04-09 00:09:04 +02:00
|
|
|
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:
|
2026-04-10 05:17:56 +02:00
|
|
|
- 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
|
2026-04-10 05:43:34 +02:00
|
|
|
echo "⚠️ Shared crates changed"
|
2026-04-10 05:17:56 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
SERVICE_CHANGED=false
|
|
|
|
|
if echo "$CHANGED_FILES" | grep -q "^apps/${SERVICE_PATH}/"; then
|
|
|
|
|
SERVICE_CHANGED=true
|
2026-04-10 05:43:34 +02:00
|
|
|
echo "✅ Service ${SERVICE} changed"
|
2026-04-10 05:17:56 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$SHARED_CHANGED" = "true" ] || [ "$SERVICE_CHANGED" = "true" ]; then
|
2026-04-10 05:43:34 +02:00
|
|
|
echo "🚀 Building ${SERVICE}"
|
2026-04-10 05:27:26 +02:00
|
|
|
exit 0
|
2026-04-10 05:17:56 +02:00
|
|
|
else
|
2026-04-10 05:43:34 +02:00
|
|
|
echo "⏭️ Skipping ${SERVICE}"
|
2026-04-10 05:27:26 +02:00
|
|
|
exit 78
|
2026-04-10 05:17:56 +02:00
|
|
|
fi
|
|
|
|
|
|
2026-04-10 05:34:44 +02:00
|
|
|
- name: build-and-push
|
2026-04-09 01:11:18 +02:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
2026-04-09 00:09:04 +02:00
|
|
|
settings:
|
|
|
|
|
registry: ghcr.io
|
|
|
|
|
repo: ghcr.io/traceworks2023/nxtgauge-rust-${SERVICE}
|
|
|
|
|
context: .
|
2026-04-10 12:56:28 +02:00
|
|
|
# Use simple Dockerfile for now
|
|
|
|
|
dockerfile: Dockerfile.simple
|
2026-04-10 05:17:56 +02:00
|
|
|
build_args:
|
|
|
|
|
- SERVICE_NAME=${SERVICE}
|
2026-04-09 00:09:04 +02:00
|
|
|
tags:
|
2026-04-10 05:17:56 +02:00
|
|
|
- ${CI_COMMIT_SHA}
|
|
|
|
|
- latest
|
2026-04-09 00:09:04 +02:00
|
|
|
- high-performance-latest
|
2026-04-10 05:24:30 +02:00
|
|
|
username:
|
|
|
|
|
from_secret: GHCR_USERNAME
|
|
|
|
|
password:
|
|
|
|
|
from_secret: GHCR_TOKEN
|
2026-04-09 00:09:04 +02:00
|
|
|
platforms: linux/amd64
|