Ops Tail Production Logs #7
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: Ops Tail Production Logs | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| tail-logs: | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Tail production backend logs | |
| uses: appleboy/ssh-action@v1.0.3 | |
| with: | |
| host: ${{ secrets.REMOTE_HOST }} | |
| username: ${{ secrets.REMOTE_USER }} | |
| key: ${{ secrets.REMOTE_SSH_KEY }} | |
| script: | | |
| set -eu | |
| sudo docker logs --since 30m --tail=500 ontime-container \ | |
| | grep -E -A40 -B10 'Apple login failed|InvalidTokenException|invalid_client|invalid_grant|audience|issuer|Exchange Apple credential|Verify Apple identity credential|/users/me/onboarding|onboarding|Onboarding|DataIntegrityViolation|MethodArgumentNotValidException|HttpMessageNotReadableException|GeneralException|Exception|ERROR|WARN' \ | |
| || true |