All checks were successful
Punisher CI/CD Full Monitor / build-and-test (push) Successful in 29s
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: Punisher CI/CD Full 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: Installazione Tool SOC
|
|
run: apt-get update && apt-get install -y build-essential valgrind curl
|
|
|
|
- name: Compilazione
|
|
run: make build
|
|
|
|
- name: Esecuzione Sandbox con Valgrind
|
|
# Eseguiamo e salviamo tutto in un file
|
|
run: |
|
|
valgrind --leak-check=full --log-file=v_report.txt ./lab_app > app_output.log 2>&1 || true
|
|
|
|
- name: Invio Report Finale
|
|
if: always()
|
|
run: |
|
|
# Uniamo i log in un unico report leggibile
|
|
echo "--- OUTPUT PROGRAMMA ---" > final.txt
|
|
cat app_output.log >> final.txt
|
|
echo -e "\n\n--- ANALISI VALGRIND ---" >> final.txt
|
|
cat v_report.txt >> final.txt
|
|
|
|
# Spediamo tutto codificato a n8n
|
|
curl -X POST -H "Content-Type: application/json" \
|
|
-d "{\"log\":\"$(cat final.txt | base64 -w 0)\"}" \
|
|
https://n8n.thepunisher-lab.duckdns.org/webhook/punisher-logs |