Collect evidence snapshot #3
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: 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 }} | |
| 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 snapshots/ registry/evidence/ | |
| git diff --cached --quiet || git commit -m "chore: snapshot evidenze $(date -u +%F)" | |
| git push |