build-container / build (push) Successful in 1m55s
- Restore ddgAnswer, which an earlier edit deleted: /api/ddg threw a ReferenceError and killed the whole server process whenever Search ran - One failing request can no longer take the server down (errors are logged and answered with a 500) - tools/smoke-test.js starts the real server and calls every endpoint; the Gitea workflow runs it before building the image, so a missing function or a crash stops the build - Search: also searches NE Hub tasks and calendar events; Seafile file search falls back to scanning file names when the search index returns nothing; Plex search falls back to the library's artists/albums; a status line shows what was searched, per-source counts and errors, with sign-in links Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
51 lines
1.5 KiB
YAML
51 lines
1.5 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
|
|
|
|
- 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
|