This commit is contained in:
@@ -36,21 +36,12 @@ jobs:
|
||||
src/lib/bots/mentionHandler.property.test.ts
|
||||
src/lib/bots/scheduler.test.ts
|
||||
|
||||
- name: Embedded database smoke test
|
||||
run: DATABASE_PATH=/tmp/synapsis-ci.db npm run db:migrate
|
||||
|
||||
- name: Production build
|
||||
run: npm run build
|
||||
|
||||
docker-validation:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Validate production compose config
|
||||
run: docker compose --env-file docker/.env.example config > /tmp/synapsis-compose.txt
|
||||
|
||||
- name: Validate source-build compose config
|
||||
run: docker compose -f docker/docker-compose.yml --env-file docker/.env.example config > /tmp/synapsis-build-compose.txt
|
||||
|
||||
- name: Build application image
|
||||
run: docker build -f docker/Dockerfile .
|
||||
env:
|
||||
AUTH_SECRET: ci-test-secret
|
||||
DATABASE_PATH: /tmp/synapsis-ci.db
|
||||
NEXT_PUBLIC_NODE_DOMAIN: localhost:43821
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
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
|
||||
Reference in New Issue
Block a user