System: Integrate Dispatcher and Update Workflow

This commit is contained in:
serhiimosiiash
2025-12-19 19:45:34 +02:00
parent 643d03f6a3
commit 6bbec7178b
2 changed files with 84 additions and 70 deletions

View File

@@ -8,23 +8,32 @@ on:
workflow_dispatch:
jobs:
# === АГЕНТ 1: РАНКОВИЙ ЗБІР ===
# === АГЕНТ 1: РАНКОВИЙ ЗБІР (STEWARDSHIP) ===
standup-check:
runs-on: ubuntu-latest
container: node:16-bullseye
container:
image: node:16-bullseye
steps:
- name: 📞 Check Connectivity
run: |
apt-get update && apt-get install -y curl
curl -f -I https://git.smagentsconsulting.uk/ || exit 1
echo "✅ Gitea is Alive. Starting the day..."
- name: 📥 Check out repository
uses: actions/checkout@v3
# === АГЕНТ 2: ОСНОВНА РОБОТА ===
- name: 🛠️ Setup Docker Tools
run: |
apt-get update && apt-get install -y curl tar
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-26.1.3.tgz -o docker.tgz
tar xzvf docker.tgz && mv docker/docker /usr/local/bin/ && chmod +x /usr/local/bin/docker
- name: 🌅 Run Standup Logic
run: |
# Запускаємо Python-код з аргументом --task standup
# Він перевірить диск, змінні оточення і запише статус у JSON
docker compose run --rm antigravity_core python main.py --task standup
# === АГЕНТ 2: ОСНОВНА РОБОТА (VALUE) ===
heavy-worker:
needs: standup-check
runs-on: ubuntu-latest
container:
# ВАЖЛИВО: Тільки image, ніяких volumes!
image: node:16-bullseye
steps:
- name: 📥 Check out repository
@@ -38,17 +47,14 @@ jobs:
- name: 🔨 Run Main Task
run: |
# Запускаємо Python-код (поки що просто версію, щоб перевірити запуск)
# Якщо main.py ще не готовий, це не впаде
echo "Starting Agent Core..."
docker compose run --rm antigravity_core python --version
# Запускаємо Worker. Він перевірить, чи успішним був стендап (через JSON)
docker compose run --rm antigravity_core python main.py --task worker
# === АГЕНТ 3: АУДИТОР ===
# === АГЕНТ 3: АУДИТОР (QUALITY) ===
qa-auditor:
needs: heavy-worker
runs-on: ubuntu-latest
container:
# ВАЖЛИВО: Тільки image, ніяких volumes!
image: node:16-bullseye
steps:
- name: 📥 Check out repository
@@ -56,38 +62,33 @@ jobs:
- name: 🛠️ Setup Docker Tools
run: |
apt-get update && apt-get install -y curl tar python3
apt-get update && apt-get install -y curl tar
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-26.1.3.tgz -o docker.tgz
tar xzvf docker.tgz && mv docker/docker /usr/local/bin/ && chmod +x /usr/local/bin/docker
- name: 🛡️ Infrastructure Audit
- name: 🛡️ Run QA Audit
run: |
if [ -f audit.py ]; then
python3 audit.py
else
echo "Audit script not found, checking docker ps..."
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"
fi
# Запускаємо аудит через main.py
docker compose run --rm antigravity_core python main.py --task audit
# === АГЕНТ 4: РЕПОРТЕР ===
# === АГЕНТ 4: РЕПОРТЕР (TRANSPARENCY) ===
scrum-report:
if: always()
needs: [standup-check, heavy-worker, qa-auditor]
runs-on: ubuntu-latest
container:
image: node:16-bullseye
steps:
- name: 📢 Daily Report
- name: 📥 Check out repository
uses: actions/checkout@v3
- name: 🛠️ Setup Docker Tools
run: |
echo "========================="
echo "📊 SPRINT REPORT"
echo "========================="
echo "Standup Check: ${{ needs.standup-check.result }}"
echo "Heavy Worker: ${{ needs.heavy-worker.result }}"
echo "QA Audit: ${{ needs.qa-auditor.result }}"
echo "========================="
if [ "${{ needs.heavy-worker.result }}" == "success" ]; then
echo "✅ Day Successful. System Stable."
else
echo "❌ Issues Detected! Check logs above."
exit 1
fi
apt-get update && apt-get install -y curl tar
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-26.1.3.tgz -o docker.tgz
tar xzvf docker.tgz && mv docker/docker /usr/local/bin/ && chmod +x /usr/local/bin/docker
- name: 📢 Generate Report
run: |
# Репортер збере всі статуси з JSON і виведе звіт
docker compose run --rm antigravity_core python main.py --task report