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
47 changes: 47 additions & 0 deletions .github/actions/docker-build-and-push/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docker Build - ghcr
description: Build image using buildx
inputs:
image-name:
required: true
description: Image name
tag:
required: true
description: Image tag
github-token:
required: true
description: GitHub token for login
registry:
required: true
description: Container registry (e.g., ghcr.io/llm-d)
runs:
using: "composite"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
run: echo "${{ inputs.github-token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
shell: bash

- name: Print image info
run: |
echo "Image name: ${{ inputs.image-name }}"
echo "Tag: ${{ inputs.tag }}"
echo "Registry: ${{ inputs.registry }}"
shell: bash

- 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/"

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

- name: Build image
run: |
docker buildx build \
--platform linux/amd64 \
-t ${{ inputs.registry }}/${{ inputs.image-name }}:${{ inputs.tag }} \
--push .
shell: bash
20 changes: 20 additions & 0 deletions .github/actions/go-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Go Test
description: Run Ginkgo tests
runs:
using: "composite"
steps:
- run: |
git config --global url."https://${{ secrets.KV_CACHE_MANAGER_TOKEN }}@github.com/".insteadOf "https://github.com/"

- run: go env -w GOPRIVATE=github.com/llm-d/*

- run: |
echo "Installing Ginkgo..."
go install github.com/onsi/ginkgo/ginkgo@latest
export PATH=$PATH:$(go env GOPATH)/bin
echo "Ginkgo installed:"
ginkgo version
echo "Running tests with Ginkgo..."
go env -w GOFLAGS=-buildvcs=false
make test
shell: bash
16 changes: 16 additions & 0 deletions .github/actions/push-image/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Push Docker Image
description: Push built image to container registry
inputs:
image-name:
required: true
tag:
required: true
registry:
required: true
runs:
using: "composite"
steps:
- name: Push image
run: |
docker push ${{ inputs.registry }}/${{ inputs.image-name }}:${{ inputs.tag }}
shell: bash
19 changes: 19 additions & 0 deletions .github/actions/trivy-scan/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Trivy Scan
description: Scan container image with Trivy
inputs:
image:
required: true
runs:
using: "composite"
steps:
- name: Install Trivy
run: |
wget https://github.com/aquasecurity/trivy/releases/download/v0.44.1/trivy_0.44.1_Linux-64bit.deb
sudo dpkg -i trivy_0.44.1_Linux-64bit.deb
shell: bash


- name: Scan image
run: |
trivy image --severity HIGH,CRITICAL --no-progress ${{ inputs.image }}
shell: bash
47 changes: 47 additions & 0 deletions .github/workflows/ci-pr-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI - PR Checks

on:
pull_request:
branches:
- main
- dev

jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Sanity check repo contents
run: ls -la

- name: Set up go with cache
uses: actions/setup-go@v5
with:
go-version: '1.24.0'
cache-dependency-path: ./go.sum

- 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/"
go env -w GOPRIVATE=github.com/llm-d/*

- name: go mod tidy
run: go mod tidy

- name: Run lint checks
uses: golangci/golangci-lint-action@v8
with:
version: 'v2.1.6'
args: "--config=./.golangci.yml"

- name: Run go test
shell: bash
run: |
make test

- name: Run go build
shell: bash
run: |
make build
49 changes: 49 additions & 0 deletions .github/workflows/ci-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI - Release - Docker Container Image

on:
push:
tags:
- 'v*' # Runs when a tag like v0.1.0 is pushed
release:
types: [published] # Also runs when a GitHub release is published

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

- name: Set project name from repository
id: version
run: |
repo="${GITHUB_REPOSITORY##*/}"
echo "project_name=$repo" >> "$GITHUB_OUTPUT"

- name: Print project name
run: echo "Project is ${{ steps.version.outputs.project_name }}"

- name: Determine tag name
id: tag
run: |
if [[ "${GITHUB_EVENT_NAME}" == "release" ]]; then
echo "tag=${GITHUB_REF##refs/tags/}" >> "$GITHUB_OUTPUT"
elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
echo "tag=${GITHUB_REF##refs/tags/}" >> "$GITHUB_OUTPUT"
else
echo "tag=latest" >> "$GITHUB_OUTPUT"
fi
shell: bash

- name: Build and push image
uses: ./.github/actions/docker-build-and-push
with:
tag: ${{ steps.tag.outputs.tag }}
image-name: ${{ steps.version.outputs.project_name }}
registry: ghcr.io/llm-d
github-token: ${{ secrets.GHCR_TOKEN }}

- name: Run Trivy scan
uses: ./.github/actions/trivy-scan
with:
image: ghcr.io/llm-d/${{ steps.version.outputs.project_name }}:${{ steps.tag.outputs.tag }}
131 changes: 0 additions & 131 deletions .tekton/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions .tekton/benchmark.yaml

This file was deleted.

Loading
Loading