Skip to content

Docker Publish

Docker Publish #19

name: Docker Publish
on:
workflow_run:
workflows: ["CI"]
types: [completed]
branches: [main]
permissions:
contents: read
packages: write
jobs:
publish:
name: Build & Push Docker Images
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
# ── kg-api ─────────────────────────────────────────────────────
- name: Build & Push kg-api
uses: docker/build-push-action@v6
with:
context: ./knowledge-graph-api
push: true
tags: ghcr.io/${{ github.repository_owner }}/kg-api:latest
cache-from: type=gha,scope=kg-api
cache-to: type=gha,scope=kg-api,mode=max
# ── kg-ui ──────────────────────────────────────────────────────
- name: Build & Push kg-ui
uses: docker/build-push-action@v6
with:
context: ./knowledge-graph-ui
push: true
tags: ghcr.io/${{ github.repository_owner }}/kg-ui:latest
cache-from: type=gha,scope=kg-ui
cache-to: type=gha,scope=kg-ui,mode=max
# ── kg-mcp ─────────────────────────────────────────────────────
- name: Build & Push kg-mcp
uses: docker/build-push-action@v6
with:
context: ./knowledge-graph-mcp
push: true
tags: ghcr.io/${{ github.repository_owner }}/kg-mcp:latest
cache-from: type=gha,scope=kg-mcp
cache-to: type=gha,scope=kg-mcp,mode=max
# ── kg-agents ──────────────────────────────────────────────────
- name: Build & Push kg-agents
uses: docker/build-push-action@v6
with:
context: ./knowledge-graph-agents
push: true
tags: ghcr.io/${{ github.repository_owner }}/kg-agents:latest
cache-from: type=gha,scope=kg-agents
cache-to: type=gha,scope=kg-agents,mode=max