name: Antigravity DevSecOps run-name: Deploying Antigravity Agent 🚀 on: push: branches: - main jobs: # 1. ЕТАП БЕЗПЕКИ (Тимчасово вимкнено для першого запуску) # security-audit: # runs-on: ubuntu-latest # steps: # - name: Check out repository code # uses: actions/checkout@v3 # - name: Gitleaks Scan # uses: gitleaks/gitleaks-action@v2 # env: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # continue-on-error: true # 2. ЕТАП ДЕПЛОЮ (Build & Run) deploy-agent: # needs: security-audit <-- Вимкнено залежність runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v3 - name: Build Docker Image run: | echo "🏗️ Building Antigravity Image..." docker build -t antigravity-core:latest . - name: Deploy Container run: | echo "🚀 Deploying to Server Infrastructure..." # Зупиняємо старий контейнер (якщо є) docker rm -f antigravity || true # УВАГА: Тут змінено назву мережі на правильну! docker run -d \ --name antigravity \ --restart unless-stopped \ --network stack_app_net \ -e DB_HOST=postgres \ -e DB_USER=postgres \ -e DB_PASS=mysecretpassword \ -e DB_NAME=postgres \ -e GRAPHITI_URL=http://graphiti:8000 \ antigravity-core:latest - name: Cleanup run: docker image prune -f