Files
hub/.gitea/workflows/build.yml
T
nmemmertandClaude Sonnet 5.5 2d17ee9939
build-container / build (push) Successful in 2m24s
Plex: repair a rejected server token or moved address instead of signing the person out
The saved Plex server token or address can stop working (token rotated, server moved). That
looked like "signed out" and sent the person back to the sign-in screen. The proxy now asks plex.tv
(using the saved account sign-in) for a fresh token and address, retries once, and saves them.
Sign-ins saved before the server id was recorded are matched by server name. A revoked account
sign-in signs the person out cleanly; repairs are one at a time and pause 30s after a failure.
The server logs [plex] lines for sign-in, connect, repair and failure.

tools/plex-test.js (31 checks, fake plex.tv + fake Plex) runs in the Gitea workflow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 16:45:05 -04:00

53 lines
1.7 KiB
YAML

name: build-container
on:
push:
branches: [main]
tags: ['v*']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Start the real server and call every endpoint; a missing function or a crash stops the build here.
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: node tools/smoke-test.js
- run: node tools/users-test.js # accounts: private data, tab limits, invites, migration
- run: node tools/plex-test.js # Plex sign-in stays signed in and repairs itself
- uses: docker/setup-buildx-action@v3
# Repo secrets needed (Settings -> Actions -> Secrets):
# REGISTRY_TOKEN a Gitea access token with write:package scope
# REGISTRY_USER optional; defaults to the user who pushed
- uses: docker/login-action@v3
with:
registry: git.necloud.us
username: ${{ secrets.REGISTRY_USER || gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: git.necloud.us/nate/hub
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=short
type=ref,event=tag
- uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=git.necloud.us/nate/hub:buildcache
cache-to: type=registry,ref=git.necloud.us/nate/hub:buildcache,mode=max