Skip to content

chore(drift-sync): needs-human model-family decision (2026-08-14) #837

chore(drift-sync): needs-human model-family decision (2026-08-14)

chore(drift-sync): needs-human model-family decision (2026-08-14) #837

name: Publish Docker Image
on:
push:
tags:
- "v*"
pull_request:
branches:
- main
workflow_dispatch:
env:
REGISTRY: ghcr.io
PRIMARY_IMAGE: ghcr.io/copilotkit/aimock
COMPAT_IMAGE: ghcr.io/copilotkit/llmock
permissions:
contents: read
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with: { persist-credentials: false }
- name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (primary — aimock)
id: meta-primary
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ${{ env.PRIMARY_IMAGE }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Extract metadata (compat — llmock)
id: meta-compat
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ${{ env.COMPAT_IMAGE }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build and push
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ steps.meta-primary.outputs.tags }}
${{ steps.meta-compat.outputs.tags }}
labels: ${{ steps.meta-primary.outputs.labels }}
# Scope the GHA cache by event so PR builds cannot poison the
# release-tag cache namespace (cache-poisoning hardening).
cache-from: type=gha,scope=${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'release' }}
cache-to: type=gha,mode=max,scope=${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'release' }}