Update Docker image ghcr.io/home-operations/tautulli to v2.16.0 [ci-skip] #43
Workflow file for this run
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: Notify & Kick Plex Users Before Upgrade | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main # or your GitOps branch | |
| jobs: | |
| notify_and_kill_plex: | |
| if: github.event.pull_request.merged == true && | |
| contains(github.event.pull_request.title, 'lscr.io/linuxserver/plex') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send Plex user notification + terminate sessions | |
| run: | | |
| curl "https://tautulli.lab.nickshores.net/api/v2?apikey=${{ secrets.TAUTULLI_API_KEY }}&cmd=get_activity" -o activity.json | |
| jq -r '.response.data[].session_id' activity.json | while read session_id; do | |
| echo "Terminating session $session_id" | |
| curl "https://tautulli.lab.nickshores.net/api/v2?apikey=${{ secrets.TAUTULLI_API_KEY }}&cmd=terminate_session&session_id=$session_id&message=Plex is restarting for update.&reason=Scheduled update" | |
| done |