19 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
Deploy via Script Externo / deploy (push) Waiting to run
ShellCheck CI / shellcheck (push) Failing after 14s
Teste Shell Runner / shell-test (push) Successful in 5s
2026-05-30 04:36:03 +00:00
admin 66b2e6f54a Atualizar .github/workflows/deploy.yml
Deploy via Script Externo / deploy (push) Waiting to run
Teste Shell Runner / shell-test (push) Successful in 6s
ShellCheck CI / shellcheck (push) Failing after 1s
2026-05-30 04:34:39 +00:00
admin ffae6d51a2 Atualizar .github/workflows/deploy.yml
Deploy via Script Externo / deploy (push) Waiting to run
ShellCheck CI / shellcheck (push) Failing after 5s
Teste Shell Runner / shell-test (push) Successful in 5s
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
Deploy via Script Externo / deploy (push) Waiting to run
ShellCheck CI / shellcheck (push) Failing after 13s
Teste Shell Runner / shell-test (push) Successful in 5s
2026-05-30 04:22:05 +00:00
admin 25d18686e4 Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Waiting to run
ShellCheck CI / shellcheck (push) Waiting to run
Teste Shell Runner / shell-test (push) Successful in 5s
2026-05-30 04:18:34 +00:00
admin 9362771f7c Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Waiting to run
ShellCheck CI / shellcheck (push) Waiting to run
Teste Shell Runner / shell-test (push) Failing after 0s
2026-05-30 04:01:19 +00:00
admin ba7d7066c0 Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Waiting to run
ShellCheck CI / shellcheck (push) Waiting to run
Teste Shell Runner / shell-test (push) Waiting to run
2026-05-30 03:52:37 +00:00
admin eca0284dac Atualizar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Waiting to run
ShellCheck CI / shellcheck (push) Waiting to run
Teste Shell Runner / shell-test (push) Waiting to run
2026-05-30 03:49:14 +00:00
admin 153f48a394 Adicionar .github/workflows/teste-shell.yml
Deploy via Script Externo / deploy (push) Waiting to run
ShellCheck CI / shellcheck (push) Waiting to run
2026-05-30 03:48:59 +00:00
4 changed files with 104 additions and 40 deletions
+33 -16
View File
@@ -1,23 +1,40 @@
name: Deploy via Script Externo name: Deploy CI
on: on:
push: push:
branches: [ main ] branches: [ master ]
workflow_dispatch: # Permite executar manualmente workflow_dispatch:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: deploy
container:
image: alpine:latest
steps: steps:
- name: 📥 Baixar código - name: Checkout
uses: actions/checkout@v4 run: |
apk add --no-cache git bash
- name: 🔧 Configurar permissões git clone http://10.11.10.71:3000/${{ gitea.repository }}.git .
run: chmod +x scripts/*.sh git checkout ${{ gitea.sha }}
- name: 🚀 Executar deploy - name: Validar scripts shell
run: ./scripts/deploy.sh run: |
env: echo "🔍 Validando sintaxe dos scripts..."
DEPLOY_ENV: production for script in scripts/*.sh; do
TIMESTAMP: $(date +%s) 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!"
-19
View File
@@ -1,19 +0,0 @@
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
+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!"
-5
View File
@@ -12,11 +12,6 @@ for script in scripts/*.sh; do
fi fi
done 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..." echo "🔧 Executando verificações pós-deploy..."
./scripts/ping_monitor.sh ./scripts/ping_monitor.sh
./scripts/ram-monitor.sh ./scripts/ram-monitor.sh