Collect evidence snapshot #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Collect evidence snapshot | |
| on: | |
| schedule: | |
| - cron: "0 6 * * 1" # ogni lunedì alle 06:00 UTC | |
| workflow_dispatch: | |
| inputs: | |
| test_telegram: | |
| description: "Invia un messaggio Telegram di prova invece del controllo cadenze reale" | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: collect-evidence | |
| cancel-in-progress: false | |
| jobs: | |
| collect: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - run: npm run collect-evidence | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Scansiona imgauth per flussi di dati personali non ancora registrati (MET-privacy) | |
| run: npm run scan-privacy | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Legge il punteggio OpenSSF Scorecard pubblico dei tre repo (A3) | |
| run: npm run scan-scorecard | |
| - name: Controlla le cadenze ricorrenti (revisioni, drill, ancoraggio) e avvisa su Telegram se qualcosa è scaduto | |
| run: npm run check-cadences | |
| env: | |
| TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
| TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
| # B3: secondo recapito opzionale (secondo referente tecnico), non | |
| # ancora configurato — un secret assente resta una stringa vuota, | |
| # nessun invio in più finché qualcuno non lo imposta. Vedi | |
| # piano-2026/umano/procedura-successione.md nel repo img-auth-hub. | |
| TELEGRAM_CHAT_ID_SECONDARY: ${{ secrets.TELEGRAM_CHAT_ID_SECONDARY }} | |
| TEST_TELEGRAM: ${{ inputs.test_telegram }} | |
| - name: Commit lo snapshot e l'aggiornamento di last_seen, se cambia qualcosa | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add tenants/attestazione/snapshots/ tenants/attestazione/registry/evidence/ | |
| git diff --cached --quiet || git commit -m "chore: snapshot evidenze $(date -u +%F)" | |
| git push |