Skip to content

Publish OCI Image

Publish OCI Image #1

Workflow file for this run

name: Publish OCI Image
on:
workflow_dispatch:
push:
tags:
- "vector-db-v*"
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
defaults:
run:
working-directory: projects/vector-db
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 GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/kroq86/vector-db-mcp
tags: |
type=match,pattern=vector-db-v(.*),group=1
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: ./projects/vector-db
file: ./projects/vector-db/Dockerfile.release
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}