WIP: starting github actions #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Llama Stack K8s Operator | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Install Kind | |
| uses: helm/kind-action@v1.8.0 | |
| with: | |
| version: v0.20.0 | |
| cluster_name: llama-stack-cluster | |
| wait: 120s | |
| - name: Install kubectl | |
| uses: azure/setup-kubectl@v3 | |
| with: | |
| version: 'latest' | |
| - name: checkout the operator repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| repository: cooktheryan/llama-stack-k8s-operator.git | |
| ref: operator_pull_policy | |
| path: llama-stack-k8s-operator | |
| - name: make the image and load it into kind | |
| run: | | |
| pwd | |
| cd llama-stack-k8s-operator | |
| IMG=quay.io/redhat-et/llama-stack-operator:v1 make docker-build | |
| podman save quay.io/redhat-et/llama-stack-operator:v1 -o llama-stack-operator.tar | |
| # load the tar file into kind | |
| kind load image-archive llama-stack-operator.tar --name llama-stack-cluster | |
| make deploy IMG=quay.io/redhat-et/llama-stack-operator:latest | |
| - name: Wait until the llama-stack-operator and namespace is ready | |
| run: | | |
| sleep 10 | |
| kubectl wait --for=condition=available --timeout=60s deployment/llama-stack-k8s-operator-controller-manager -n llama-stack-k8s-operator-system | |
| - name: Install Llama Stack Operator and always list the pods regardless if the previous step failed | |
| if: always() | |
| run: | | |
| cd .. | |
| pwd | |
| kubectl get po -A |