name: diagnose-hotspot-access on: workflow_dispatch: permissions: contents: read jobs: diagnose: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Read-only production diagnosis shell: bash run: | set -euo pipefail docker inspect pix-hotspot --format 'IMAGE={{.Config.Image}} PORTS={{json .NetworkSettings.Ports}}' docker exec -i pix-hotspot node --input-type=module < backend/diagnose-hotspot.mjs - name: Recent access errors if: always() shell: bash run: | docker logs --since 2h --tail 2000 pix-hotspot 2>&1 | node -e 'let s="";process.stdin.on("data",x=>s+=x);process.stdin.on("end",()=>console.log(s.split("\n").filter(l=>/\[ACESSO/.test(l)).slice(-40).map(l=>l.replace(/(?:[0-9a-f]{2}:){5}[0-9a-f]{2}/gi,"[MAC]").replace(/(?:\d{1,3}\.){3}\d{1,3}/g,"[IP]")).join("\n")));'