25 Commits

Author SHA1 Message Date
admin ab24ed926b Adicionar .github/workflows/deploy.yml
Teste Shell Runner / shell-test (push) Successful in 20s
2026-05-30 20:13:15 +00:00
admin d37dbc30f2 Atualizar scripts/deploy.sh
Teste Shell Runner / shell-test (push) Successful in 20s
2026-05-30 20:12:09 +00:00
admin d4287fbde3 Excluir .github/workflows/deploy.yml
Teste Shell Runner / shell-test (push) Successful in 20s
2026-05-30 19:24:02 +00:00
admin 31a1757c45 Excluir .github/workflows/shellcheck.yml
Deploy via Script Externo / deploy (push) Failing after 5s
Teste Shell Runner / shell-test (push) Successful in 19s
2026-05-30 19:22:15 +00:00
admin 6861471ad3 Atualizar .github/workflows/shellcheck.yml
Deploy via Script Externo / deploy (push) Failing after 5s
Teste Shell Runner / shell-test (push) Successful in 20s
2026-05-30 19:20:03 +00:00
admin 4b2ce601ac Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Failing after 10s
ShellCheck CI / shellcheck (push) Failing after 1s
Teste Shell Runner / shell-test (push) Successful in 20s
2026-05-30 10:47:51 +00:00
admin 02ca7dcd2a Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Failing after 5s
ShellCheck CI / shellcheck (push) Failing after 1s
Teste Shell Runner / shell-test (push) Successful in 19s
2026-05-30 10:46:22 +00:00
admin 4563571bf2 Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Failing after 5s
ShellCheck CI / shellcheck (push) Failing after 1s
Teste Shell Runner / shell-test (push) Successful in 5s
2026-05-30 10:35:22 +00:00
admin dcc43c7d93 Atualizar .github/workflows/deploy.yml
Deploy via Script Externo / deploy (push) Failing after 5s
ShellCheck CI / shellcheck (push) Failing after 1s
Teste Shell Runner / shell-test (push) Successful in 5s
2026-05-30 04:39:45 +00:00
admin e3982eb7e3 Atualizar .github/workflows/shellcheck.yml
ShellCheck CI / shellcheck (push) Failing after 14s
Teste Shell Runner / shell-test (push) Successful in 5s
Deploy via Script Externo / deploy (push) Has been cancelled
2026-05-30 04:36:03 +00:00
admin 66b2e6f54a Atualizar .github/workflows/deploy.yml
Teste Shell Runner / shell-test (push) Successful in 6s
ShellCheck CI / shellcheck (push) Failing after 1s
Deploy via Script Externo / deploy (push) Has been cancelled
2026-05-30 04:34:39 +00:00
admin ffae6d51a2 Atualizar .github/workflows/deploy.yml
ShellCheck CI / shellcheck (push) Failing after 5s
Teste Shell Runner / shell-test (push) Successful in 5s
Deploy via Script Externo / deploy (push) Has been cancelled
2026-05-30 04:31:53 +00:00
admin 80c2d04159 Atualizar .github/workflows/deploy.yml
Deploy via Script Externo / deploy (push) Failing after 1s
Teste Shell Runner / shell-test (push) Successful in 5s
ShellCheck CI / shellcheck (push) Failing after 6s
2026-05-30 04:22:27 +00:00
admin bfd7ef2838 Atualizar .github/workflows/shellcheck.yml
ShellCheck CI / shellcheck (push) Failing after 13s
Teste Shell Runner / shell-test (push) Successful in 5s
Deploy via Script Externo / deploy (push) Has been cancelled
2026-05-30 04:22:05 +00:00
admin 25d18686e4 Atualizar .github/workflows/teste-shell.yml
Teste Shell Runner / shell-test (push) Successful in 5s
Deploy via Script Externo / deploy (push) Has been cancelled
ShellCheck CI / shellcheck (push) Has been cancelled
2026-05-30 04:18:34 +00:00
admin 9362771f7c Atualizar .github/workflows/teste-shell.yml
Teste Shell Runner / shell-test (push) Failing after 0s
Deploy via Script Externo / deploy (push) Has been cancelled
ShellCheck CI / shellcheck (push) Has been cancelled
2026-05-30 04:01:19 +00:00
admin ba7d7066c0 Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Has been cancelled
ShellCheck CI / shellcheck (push) Has been cancelled
Teste Shell Runner / shell-test (push) Has been cancelled
2026-05-30 03:52:37 +00:00
admin eca0284dac Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Has been cancelled
ShellCheck CI / shellcheck (push) Has been cancelled
Teste Shell Runner / shell-test (push) Has been cancelled
2026-05-30 03:49:14 +00:00
admin 153f48a394 Adicionar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Has been cancelled
ShellCheck CI / shellcheck (push) Has been cancelled
2026-05-30 03:48:59 +00:00
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 143 additions and 1 deletions
+40
View File
@@ -0,0 +1,40 @@
name: Deploy CI
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
deploy:
runs-on: deploy
container:
image: alpine:latest
steps:
- name: Checkout
run: |
apk add --no-cache git bash
git clone http://10.11.10.71:3000/${{ gitea.repository }}.git .
git checkout ${{ gitea.sha }}
- name: Validar scripts shell
run: |
echo "🔍 Validando sintaxe dos scripts..."
for script in scripts/*.sh; do
if [ -f "$script" ]; then
echo "✅ Validando $script..."
bash -n "$script"
fi
done
- name: Executar verificações pós-deploy
run: |
echo "🔧 Executando verificações pós-deploy..."
chmod +x scripts/*.sh
./scripts/ping_monitor.sh
./scripts/ram-monitor.sh
./scripts/disk-monitor.sh
- name: Concluir deploy
run: echo "✅ Deploy concluído com sucesso!"
+71
View File
@@ -0,0 +1,71 @@
name: Teste Shell Runner
on:
push:
branches:
- main
jobs:
shell-test:
runs-on: deploy
steps:
- name: ✅ Verificar sistema
run: |
echo "=== Runner funcionando! ==="
echo "Data: $(date)"
echo "Hostname: $(hostname)"
uname -a
- name: 📦 Verificar ferramentas disponíveis
run: |
echo "=== Sistema base ==="
cat /etc/os-release
echo ""
echo "=== Ferramentas disponíveis ==="
which bash && bash --version | head -1
which curl && curl --version | head -1
which wget && wget --version 2>&1 | head -1 || echo "wget: não instalado"
which git && git --version
- name: 📦 Instalar python3 se necessário
run: |
# Alpine usa apk, Ubuntu/Debian usa apt
if command -v apk &>/dev/null; then
apk add --no-cache python3
elif command -v apt-get &>/dev/null; then
apt-get update -qq && apt-get install -y -qq python3 curl
fi
python3 --version
- name: 📦 Instalar curl se necessário
run: |
# Alpine usa apk, Ubuntu/Debian usa apt
if command -v apk &>/dev/null; then
apk add --no-cache curl
elif command -v apt-get &>/dev/null; then
apt-get update -qq && apt-get install -y -qq curl
fi
- name: 🌐 Testar conectividade externa
run: |
echo "=== Ping externo ==="
curl -s https://ifconfig.me && echo ""
echo "Conectividade OK!"
- name: 📝 Criar e executar script shell inline
run: |
cat > /tmp/meu-script.sh << 'EOF'
#!/bin/bash
echo "=== Script a correr dentro do runner ==="
echo "Utilizador: $(whoami)"
echo "Directório: $(pwd)"
echo "Memória disponível:"
free -h
echo "Espaço em disco:"
df -h /
EOF
chmod +x /tmp/meu-script.sh
bash /tmp/meu-script.sh
- name: 🎉 Teste concluído
run: echo "Todos os steps passaram com sucesso!"
+1 -1
View File
@@ -1,3 +1,3 @@
# sysadmin-toolkit # sysadmin-toolkit
Repo de teste workflow Repo de teste workflow
Texto AB Texto A
Binary file not shown.
+20
View File
@@ -0,0 +1,20 @@
#!/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
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 #!/bin/bash
HOST="8.8.8.8" HOST="8.8.8.8"
echo "Testando conectividade..." echo "Testando conectividade..."
echo "🌐 Testando conectividade com $HOST..."
ping -c 4 $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