Skip to content

Merge remote-tracking branch 'origin/fix/api-database-initialization'… #54

Merge remote-tracking branch 'origin/fix/api-database-initialization'…

Merge remote-tracking branch 'origin/fix/api-database-initialization'… #54

name: Build and Publish Docker images
on:
push:
branches: ['master', 'dev']
paths-ignore:
- 'website/**'
- '**/*.md'
- 'docs/**'
release:
types: [published]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Enhanced diagnostics for troubleshooting
- name: Check repository structure
run: |
echo "==== Repository root structure ===="
ls -la
echo "==== Project directories ===="
find . -maxdepth 1 -type d -name "ConduitLLM*" | sort
for dir in $(find . -maxdepth 1 -type d -name "ConduitLLM*"); do
echo "==== Contents of $dir ===="
ls -la $dir | head -n 10
done
echo "==== Solution files ===="
find . -maxdepth 1 -name "*.sln"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Add metadata for the WebUI image
- name: Extract metadata for WebUI
id: meta-webui
uses: docker/metadata-action@v5
with:
images: ghcr.io/knnlabs/conduit-webui
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha,format=long
type=raw,value=latest,enable=${{ github.ref_name == 'master' }}
# Build and push WebUI Docker image
- name: Build and push WebUI Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./ConduitLLM.WebUI/Dockerfile
push: true
tags: ${{ steps.meta-webui.outputs.tags }}
labels: ${{ steps.meta-webui.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Add build args for better diagnostics
build-args: |
BUILDKIT_INLINE_CACHE=1
# Add metadata for the HTTP API image
- name: Extract metadata for HTTP API
id: meta-http
uses: docker/metadata-action@v5
with:
images: ghcr.io/knnlabs/conduit-http
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha,format=long
type=raw,value=latest,enable=${{ github.ref_name == 'master' }}
# Build and push Http Docker image
- name: Build and push Http Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./ConduitLLM.Http/Dockerfile
push: true
tags: ${{ steps.meta-http.outputs.tags }}
labels: ${{ steps.meta-http.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Add build args for better diagnostics
build-args: |
BUILDKIT_INLINE_CACHE=1