Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/actions/docker-build-and-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
github-token:
required: true
description: GitHub token for login
kv-cache-manager-token:
required: true
description: Token for llm-d-kv-cache-manager private module
registry:
required: true
description: Container registry (e.g., ghcr.io/llm-d)
Expand All @@ -32,12 +35,10 @@ runs:

- name: Configure Git to use token for private modules
run: |
git config --global url."https://${{ secrets.KV_CACHE_MANAGER_TOKEN }}@github.com/".insteadOf "https://github.com/"
git config --global url."https://${{ inputs.kv-cache-manager-token }}@github.com/".insteadOf "https://github.com/"
go env -w GOPRIVATE=github.com/llm-d/*
shell: bash

- name: Set Go environment for private modules
run: |
go env -w GOPRIVATE=github.com/llm-d/*

- name: Build image
run: |
docker buildx build \
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/ci-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI - Merge - Docker Container Image

on:
push:
branches:
- dev
- main
pull_request: # temporary trigger for testing in PRs
branches:
- dev
- main

jobs:
docker-build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Load version information
id: version
run: |
VERSION_FILE=".version.json"
dev_version=$(jq -r '.["dev-version"]' "$VERSION_FILE")
dev_registry=$(jq -r '.["dev-registry"]' "$VERSION_FILE")
prod_version=$(jq -r '.["prod-version"]' "$VERSION_FILE")
prod_registry=$(jq -r '.["prod-registry"]' "$VERSION_FILE")
if [[ "${GITHUB_REF_NAME}" == "dev" ]]; then
echo "tag=$dev_version" >> "$GITHUB_OUTPUT"
echo "registry=$dev_registry" >> "$GITHUB_OUTPUT"
elif [[ "${GITHUB_REF_NAME}" == "main" ]]; then
echo "tag=$prod_version" >> "$GITHUB_OUTPUT"
echo "registry=$prod_registry" >> "$GITHUB_OUTPUT"
else
echo "tag=$dev_version" >> "$GITHUB_OUTPUT"
echo "registry=$dev_registry" >> "$GITHUB_OUTPUT"
fi
shell: bash

- name: Print version and registry
run: |
echo "Tag: ${{ steps.version.outputs.tag }}"
echo "Registry: ${{ steps.version.outputs.registry }}"

- name: Build and push image
uses: ./.github/actions/docker-build-and-push
with:
tag: ${{ steps.version.outputs.tag }}
image-name: llm-d-inference-scheduler
registry: ${{ steps.version.outputs.registry }}
github-token: ${{ secrets.GHCR_TOKEN }}
kv-cache-manager-token: ${{ secrets.KV_CACHE_MANAGER_TOKEN }}
Loading