Skip to content

fix(drift): classify gemini-4-hydrogen #1266

fix(drift): classify gemini-4-hydrogen

fix(drift): classify gemini-4-hydrogen #1266

Workflow file for this run

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@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.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@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.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' }}