Files
Synapsis/.github/workflows/docker.yml
T
cyph3rasi b4a9d82d05 Add docker publish flow, node blocklist & API updates
Replace docker/metadata GH Action with a docker-publish.sh driven workflow (supports auto-versioning, extra tags, multi-arch builds and optional builder). Update docs and READMEs to use the updater and new publish flow. Add server-side swarm/node blocklist support and admin nodes API. Improve auth endpoints (me, logout, switch, session accounts) and support account switching. Extend bots API to support custom LLM provider and optional endpoint. Enforce node blocklist on chat send/receive, refactor link preview handling into dedicated preview modules, and enhance notifications and posts like/repost handlers to accept both signed actions and regular auth flows. Misc: remove admin update UI details, add helper libs (media previews, node-blocklist, reposts, notifications, etc.), and minor housekeeping (pyc, workflow tweaks).
2026-03-10 12:40:05 -07:00

63 lines
1.7 KiB
YAML

name: Build and Push Docker Image to GHCR
on:
workflow_dispatch:
inputs:
tag:
description: 'Optional explicit version tag (for example 2026.03.09.10). Leave blank to auto-increment.'
required: false
default: ''
# Also build on version tags
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: gnosyslabs/synapsis
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
env:
IMAGE_REPO: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
PLATFORMS: linux/amd64,linux/arm64
PRUNE_BUILD_CACHE: '0'
APP_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || '' }}
EXTRA_TAGS: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || '' }}
run: |
if [ -n "$EXTRA_TAGS" ]; then
EXTRA_TAGS="${EXTRA_TAGS#v}"
export EXTRA_TAGS
if [ -z "$APP_VERSION" ]; then
APP_VERSION="$EXTRA_TAGS"
export APP_VERSION
fi
fi
chmod +x ./scripts/docker-publish.sh
./scripts/docker-publish.sh