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
13 changes: 4 additions & 9 deletions .github/actions/docker-build-and-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
description: GitHub token for login
kv-cache-manager-token:
required: true
description: Token for llm-d-kv-cache-manager private module
description: KV Cache Manager llm-d repo token
registry:
required: true
description: Container registry (e.g., ghcr.io/llm-d)
Expand All @@ -33,16 +33,11 @@ runs:
echo "Registry: ${{ inputs.registry }}"
shell: bash

- name: Configure Git to use token for private modules
run: |
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: Build image
- name: Build image and push
run: |
docker buildx build \
--platform linux/amd64 \
--build-arg KV_CACHE_MANAGER_TOKEN=${{ inputs.kv-cache-manager-token }} \
-t ${{ inputs.registry }}/${{ inputs.image-name }}:${{ inputs.tag }} \
--push .
shell: bash
shell: bash
16 changes: 0 additions & 16 deletions .github/actions/push-image/action.yml

This file was deleted.

28 changes: 12 additions & 16 deletions .github/workflows/ci-merge.yaml → .github/workflows/ci-push.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: CI - Merge - Docker Container Image
name: CI - Push

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

jobs:
docker-build-and-push:
Expand All @@ -20,33 +16,33 @@ jobs:
- name: Load version information
id: version
run: |
repo="${GITHUB_REPOSITORY##*/}"
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"
echo "project_name=$repo-dev" >> "$GITHUB_OUTPUT"
elif [[ "${GITHUB_REF_NAME}" == "main" ]]; then
echo "tag=$prod_version" >> "$GITHUB_OUTPUT"
echo "registry=$prod_registry" >> "$GITHUB_OUTPUT"
echo "project_name=$repo" >> "$GITHUB_OUTPUT"
else
echo "tag=$dev_version" >> "$GITHUB_OUTPUT"
echo "registry=$dev_registry" >> "$GITHUB_OUTPUT"
echo "project_name=$repo-dev" >> "$GITHUB_OUTPUT"
fi
shell: bash

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

- 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 }}
image-name: ${{ steps.version.outputs.project_name }}
registry: ghcr.io/llm-d
github-token: ${{ secrets.GHCR_TOKEN }}
kv-cache-manager-token: ${{ secrets.KV_CACHE_MANAGER_TOKEN }}
kv-cache-manager-token: ${{ secrets.KV_CACHE_MANAGER_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/ci-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
image-name: ${{ steps.version.outputs.project_name }}
registry: ghcr.io/llm-d
github-token: ${{ secrets.GHCR_TOKEN }}
kv-cache-manager-token: ${{ secrets.KV_CACHE_MANAGER_TOKEN }}

- name: Run Trivy scan
uses: ./.github/actions/trivy-scan
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ ENV CGO_ENABLED=1
ENV GOOS=${TARGETOS:-linux}
ENV GOARCH=${TARGETARCH}
RUN go build -a -o bin/epp -ldflags="-extldflags '-L$(pwd)/lib'" cmd/epp/main.go cmd/epp/health.go
RUN rm -rf ~/.netrc # remove git token

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
Loading