diff --git a/.github/workflows/teste-shell.yml b/.github/workflows/teste-shell.yml index e69de29..45d310e 100644 --- a/.github/workflows/teste-shell.yml +++ b/.github/workflows/teste-shell.yml @@ -0,0 +1,50 @@ +name: Teste Shell Runner + +on: + push: + branches: + - main + +jobs: + shell-test: + runs-on: ubuntu-latest + + steps: + - name: ✅ Verificar sistema + run: | + echo "=== Runner funcionando! ===" + echo "Data: $(date)" + echo "Hostname: $(hostname)" + uname -a + + - name: 📦 Verificar ferramentas disponíveis + run: | + echo "=== Ferramentas ===" + bash --version + python3 --version + curl --version | head -1 + + - 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!" \ No newline at end of file