name: Docker SSoT Guard (Minimal)

on:
  push:
    paths:
      - 'docker/**'
      - '.github/workflows/ssot-guard.yml'
  pull_request:
    paths:
      - 'docker/**'
      - '.github/workflows/ssot-guard.yml'

jobs:
  check-compose-config:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      # FIX: .env aus Example erstellen, damit Variablen da sind
      - name: Create .env context
        run: cp docker/.env.example docker/.env

      # FIX: .yaml Extension nutzen (SSoT)
      - name: Validate Docker Compose Config
        run: docker compose --env-file docker/.env -f docker/docker-compose.yaml config
