Cleanup: Remove infrastructure audit workflow
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
name: Infrastructure Audit
|
|
||||||
run-name: 📊 Server Status Report
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
audit:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: node:16-bullseye
|
|
||||||
steps:
|
|
||||||
- name: 📥 Check out repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: 🛠️ Setup Tools
|
|
||||||
run: |
|
|
||||||
# Встановлюємо Python
|
|
||||||
apt-get update && apt-get install -y python3 curl tar
|
|
||||||
|
|
||||||
# Завантажуємо НАЙНОВІШИЙ Docker CLI вручну (Static Binary)
|
|
||||||
echo "⬇️ Downloading latest Docker CLI..."
|
|
||||||
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/docker
|
|
||||||
chmod +x /usr/local/bin/docker
|
|
||||||
rm -rf docker docker.tgz
|
|
||||||
|
|
||||||
# Перевіряємо версію
|
|
||||||
docker --version
|
|
||||||
|
|
||||||
- name: 🐍 Run Audit Script
|
|
||||||
run: python3 audit.py
|
|
||||||
29
audit.py
29
audit.py
@@ -1,29 +0,0 @@
|
|||||||
import os
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
# Простий спосіб перевірити докер без важких бібліотек
|
|
||||||
def check_docker():
|
|
||||||
print("="*40)
|
|
||||||
print(f"🛡️ INFRASTRUCTURE REPORT")
|
|
||||||
print(f"📅 {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
|
||||||
print("="*40)
|
|
||||||
|
|
||||||
# Перевіряємо запущені контейнери через системну команду
|
|
||||||
stream = os.popen('docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"')
|
|
||||||
output = stream.read()
|
|
||||||
|
|
||||||
if not output:
|
|
||||||
print("❌ Error: Cannot connect to Docker or no containers running.")
|
|
||||||
return
|
|
||||||
|
|
||||||
print(output)
|
|
||||||
|
|
||||||
if "watchtower" in output:
|
|
||||||
print("\n✅ WATCHTOWER IS ACTIVE AND MONITORING.")
|
|
||||||
else:
|
|
||||||
print("\n⚠️ WATCHTOWER NOT FOUND!")
|
|
||||||
|
|
||||||
print("="*40)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
check_docker()
|
|
||||||
Reference in New Issue
Block a user