Skip to content
Closed
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
32 changes: 27 additions & 5 deletions .github/workflows/generate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
python-version: '3.12'

- name: Run pre-commit checks
uses: pre-commit/action@a26af69be951a213d495a4c3e4e4022e16d87065
uses: pre-commit/action@576ff52938d158a24ac7e009dfa94b1455e7df99
continue-on-error: true
id: precommit
env:
Expand Down Expand Up @@ -178,16 +178,38 @@ jobs:
echo "✅ Committed release changes to ${{ steps.validate.outputs.release_branch }}"
fi

finalize-release:
generate-e2e-tag:
needs: generate-release
runs-on: ubuntu-24.04
outputs:
image_tag: ${{ steps.tag.outputs.value }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ needs.generate-release.outputs.release_branch }}

- name: Generate image tag
id: tag
run: echo "value=${{ needs.generate-release.outputs.release_branch }}_$(date +%m%d-%H%M)_$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

run-e2e-tests:
name: step name
needs: [generate-release, generate-e2e-tag]
uses: llamastack/llama-stack-k8s-operator/.github/workflows/run-e2e-test.yml@200881258fba8f0411003062e47e94c0a397b7c4
with:
image_tag: ${{ needs.generate-e2e-tag.outputs.image_tag }}

finalize-release:
needs: [generate-release, run-e2e-tests]
runs-on: ubuntu-24.04
env:
operator_version: ${{ needs.generate-release.outputs.operator_version }}
llamastack_version: ${{ needs.generate-release.outputs.llamastack_version }}
release_branch: ${{ needs.generate-release.outputs.release_branch }}
steps:
- name: Checkout code
uses: actions/checkout@a26af69be951a213d495a4c3e4e4022e16d87065
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ env.release_branch }}
fetch-depth: 0
Expand Down Expand Up @@ -244,7 +266,7 @@ jobs:
GH_TOKEN: ${{ github.token }}

- name: Set up Go
uses: actions/setup-go@a26af69be951a213d495a4c3e4e4022e16d87065
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
with:
go-version: ${{ env.GO_VERSION }}

Expand All @@ -254,7 +276,7 @@ jobs:
make image-build IMG=quay.io/llamastack/llama-stack-k8s-operator:v${{ env.operator_version }}

- name: Log in to Quay.io
uses: docker/login-action@a26af69be951a213d495a4c3e4e4022e16d87065
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
registry: quay.io
username: ${{ secrets.APP_QUAY_USERNAME }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/run-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
pull_request:
types: [opened, synchronize, reopened]
branches: [ main ]
workflow_call:
inputs:
image_tag:
description: 'Image tag to use for the operator image'
required: true
type: string

jobs:
e2e-tests:
Expand Down Expand Up @@ -59,11 +65,14 @@ jobs:

- name: Build operator image
run: |
# Build the image with a simpler tag format
docker build -t kind-registry:5000/llama-stack-k8s-operator:pr${{ github.event.pull_request.number }} -f Dockerfile .
if [ -n "${{ inputs.image_tag }}" ]; then
IMAGE_TAG="${{ inputs.image_tag }}"
else
IMAGE_TAG="pr${{ github.event.pull_request.number }}"
fi

# Tag the image for local registry
docker tag kind-registry:5000/llama-stack-k8s-operator:pr${{ github.event.pull_request.number }} kind-registry:5000/llama-stack-k8s-operator:latest
docker build -t kind-registry:5000/llama-stack-k8s-operator:${IMAGE_TAG} -f Dockerfile .
docker tag kind-registry:5000/llama-stack-k8s-operator:${IMAGE_TAG} kind-registry:5000/llama-stack-k8s-operator:latest

- name: Push operator image to local registry
run: |
Expand Down