Skip to content

ci: ensure needed namespace exists #16

ci: ensure needed namespace exists

ci: ensure needed namespace exists #16

name: Check Open WebUI Helm Charts (pipelines)
on:
pull_request:
paths:
- "charts/pipelines/**"
- ".github/workflows/helm-test-pipelines.yml"
push:
paths:
- "charts/pipelines/**"
- ".github/workflows/helm-test-pipelines.yml"
jobs:
lint-chart:
name: Lint Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Lint pipelines Helm Chart
run: |
helm lint ./charts/pipelines
test-deploy:
name: Test Chart Deployment
runs-on: ubuntu-latest
needs: lint-chart
env:
NAMESPACE: test-namespace
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up kubectl
uses: azure/setup-kubectl@v4
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Set up KinD Cluster
uses: helm/kind-action@v1
- name: Template open-webui Helm Chart
run: |
helm template pipelines ./charts/pipelines \
--namespace "$NAMESPACE" > pipelines.yaml
- name: Ensure test namespace
run: |
# Create the namespace
kubectl create namespace "$NAMESPACE"
# Wait for the namespace to be ready
for i in {1..30}; do
kubectl get namespace "$NAMESPACE" --no-headers && break || sleep 2
echo "Waiting for namespace '$NAMESPACE' to become available..."
done
echo "Namespace '$NAMESPACE' is now available."
- name: Verify pipelines
run: |
kubectl apply -f pipelines.yaml