Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fe367f4b04 | |||
| dc36dd2eef | |||
| 1f366d5d70 | |||
| 9c7bad351d | |||
| 8eedb63290 | |||
| af7a24fcf2 |
@@ -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)
|
||||
@@ -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,3 +1,3 @@
|
||||
# sysadmin-toolkit
|
||||
Repo de teste workflow
|
||||
Texto AB
|
||||
Texto A
|
||||
Binary file not shown.
Executable
+25
@@ -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!"
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
df -h
|
||||
@@ -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
|
||||
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
free -h
|
||||
Reference in New Issue
Block a user