6 Commits

Author SHA1 Message Date
admin fe367f4b04 fix: substituido _ po - no nome script ram e disk 2026-05-19 02:52:39 +00:00
admin dc36dd2eef feat: adicionado if then 2026-05-19 02:38:08 +00:00
admin 1f366d5d70 Merge pull request #2 from maudocante/feature/ram-monitor
Feature/ram monitor
2026-05-18 21:16:00 +00:00
admin 9c7bad351d Merge branch 'main' into feature/ram-monitor 2026-05-18 21:15:19 +00:00
admin 8eedb63290 docs: adicionado AC 2026-05-18 21:04:59 +00:00
admin af7a24fcf2 feat: adicionado feature ram 2026-05-18 20:36:35 +00:00
8 changed files with 79 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
name: Deploy via Script Externo
on:
push:
branches: [ main ]
workflow_dispatch: # Permite executar manualmente
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: 📥 Baixar código
uses: actions/checkout@v4
- name: 🔧 Configurar permissões
run: chmod +x scripts/*.sh
- name: 🚀 Executar deploy
run: ./scripts/deploy.sh
env:
DEPLOY_ENV: production
TIMESTAMP: $(date +%s)
+19
View File
@@ -0,0 +1,19 @@
name: ShellCheck CI
on:
push:
branches: [ main, feature/* ]
pull_request:
branches: [ main ]
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
severity: warning
ignore_paths: logs
+1 -1
View File
@@ -1,3 +1,3 @@
# sysadmin-toolkit
Repo de teste workflow
Texto AB
Texto A
Binary file not shown.
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
# Script de deploy executado pelo GitHub Actions
echo "🚀 Iniciando deploy automático..."
echo "📦 Deploy ID: $(date +%Y%m%d-%H%M%S)"
# Verificar scripts
for script in scripts/*.sh; do
if [ -f "$script" ]; then
echo "✅ Validando $script..."
bash -n "$script" # Syntax check
fi
done
# Simular deploy
echo "📂 Criando backup..."
mkdir -p backups
tar -czf "backups/backup-$(date +%Y%m%d).tar.gz" scripts/
echo "🔧 Executando verificações pós-deploy..."
./scripts/ping_monitor.sh
./scripts/ram-monitor.sh
./scripts/disk-monitor.sh
echo "✅ Deploy concluído com sucesso!"
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
df -h
+7
View File
@@ -1,4 +1,11 @@
#!/bin/bash
HOST="8.8.8.8"
echo "Testando conectividade..."
echo "🌐 Testando conectividade com $HOST..."
ping -c 4 $HOST
if [ $? -eq 0 ]; then
echo "✅ Conexão OK"
else
echo "❌ Falha na conexão"
exit 1
fi
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
free -h