92 lines
3.1 KiB
YAML
92 lines
3.1 KiB
YAML
name: Agile Squad Operations
|
||
run-name: 🚀 Antigravity Daily Cycle
|
||
|
||
on:
|
||
schedule:
|
||
# UTC Time: 07:00(09 UA), 11:00(13 UA), 15:00(17 UA), 19:00(21 UA)
|
||
- cron: '0 7,11,15,19 * * *'
|
||
workflow_dispatch:
|
||
|
||
jobs:
|
||
# === АГЕНТ 1: РАНКОВИЙ ЗБІР ===
|
||
standup-check:
|
||
runs-on: ubuntu-latest
|
||
container: 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..."
|
||
|
||
# === АГЕНТ 2: ОСНОВНА РОБОТА ===
|
||
heavy-worker:
|
||
needs: standup-check
|
||
runs-on: ubuntu-latest
|
||
container:
|
||
image: node:16-bullseye
|
||
# ПРИБРАНО volumes, бо Runner це робить сам!
|
||
steps:
|
||
- name: 📥 Check out repository
|
||
uses: actions/checkout@v3
|
||
|
||
- 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 Main Task
|
||
run: |
|
||
# Запускаємо основний скрипт
|
||
docker compose run --rm antigravity_core python main.py
|
||
|
||
# === АГЕНТ 3: АУДИТОР ===
|
||
qa-auditor:
|
||
needs: heavy-worker
|
||
runs-on: ubuntu-latest
|
||
container:
|
||
image: node:16-bullseye
|
||
# ПРИБРАНО volumes
|
||
steps:
|
||
- name: 📥 Check out repository
|
||
uses: actions/checkout@v3
|
||
|
||
- name: 🛠️ Setup Docker Tools
|
||
run: |
|
||
apt-get update && apt-get install -y curl tar python3
|
||
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
|
||
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
|
||
|
||
# === АГЕНТ 4: РЕПОРТЕР ===
|
||
scrum-report:
|
||
if: always()
|
||
needs: [standup-check, heavy-worker, qa-auditor]
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: 📢 Daily Report
|
||
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
|