mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
ci: add GitHub Actions workflow to build and push to Azure ACR
Builds the LiteLLM Docker image on push to main and fix/* branches, then pushes to Azure Container Registry with commit SHA and latest tags. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b60e30a58b
commit
fd05892dd6
1 changed files with 35 additions and 0 deletions
35
.github/workflows/build-push.yml
vendored
Normal file
35
.github/workflows/build-push.yml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
name: Build and Push LiteLLM Image
|
||||
on:
|
||||
push:
|
||||
branches: [main, fix/*]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: ${{ secrets.AZURE_DASH_REGISTRY_URL }}
|
||||
IMAGE_NAME: litellm-proxy
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to Azure Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.AZURE_DASH_REGISTRY_CLIENT_ID }}
|
||||
password: ${{ secrets.AZURE_DASH_REGISTRY_CLIENT_SECRET }}
|
||||
|
||||
- name: Get short SHA
|
||||
uses: benjlevesque/short-sha@v2.1
|
||||
id: short-sha
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.short-sha.outputs.sha }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
Loading…
Add table
Reference in a new issue