name: Punisher CI/CD Final Monitor on: [push] jobs: build-and-test: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest options: --memory=128mb --cpus=0.5 steps: - name: Checkout del codice uses: actions/checkout@v3 - name: Setup Tools run: apt-get update && apt-get install -y build-essential valgrind curl - name: Compilazione run: make build - name: Analisi Valgrind run: | valgrind --leak-check=full --log-file=v_report.txt ./lab_app 2>&1 | tee output.log || true - name: Spedizione Report if: always() continue-on-error: true run: | # Creazione report echo "--- LOG PROGRAMMA ---" > final.txt cat output.log >> final.txt echo -e "\n\n--- ANALISI MEMORIA ---" >> final.txt cat v_report.txt >> final.txt # Trasformazione in Base64 REPORT_B64=$(cat final.txt | base64 -w 0) # Invio a n8n (Usa l'IP locale per evitare errori DuckDNS) curl -X POST -H "Content-Type: application/json" \ -d "{\"log\":\"$REPORT_B64\"}" \ http://172.17.0.1:5678/webhook/punisher-logs