Skip to content

Build LLM Inferencing Image #4

Build LLM Inferencing Image

Build LLM Inferencing Image #4

name: Build LLM Inferencing Image
on:
push:
branches: [main]
paths:
- "examples/llm/distributed-inferencing/Dockerfile"
pull_request:
branches: [main]
paths:
- "examples/llm/distributed-inferencing/Dockerfile"
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: Azure-Samples/aks-ai/llm-inferencing
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: examples/llm/distributed-inferencing
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}