Skip to content

open-webui-release-published #4

open-webui-release-published

open-webui-release-published #4

name: Bump Open WebUI Helm Chart
on:
workflow_dispatch:
inputs:
app_version:
description: "Open WebUI app version, without the leading v"
required: true
repository_dispatch:
types:
- open-webui-release-published
jobs:
bump-chart:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Update chart metadata
id: chart
env:
INPUT_APP_VERSION: ${{ github.event.inputs.app_version }}
PAYLOAD_APP_VERSION: ${{ github.event.client_payload.app_version }}
run: |
set -euo pipefail
app_version="${PAYLOAD_APP_VERSION:-${INPUT_APP_VERSION:-}}"
app_version="${app_version#v}"
if ! [[ "${app_version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Expected app version like 0.6.19, got '${app_version}'" >&2
exit 1
fi
chart_path="charts/open-webui/Chart.yaml"
current_app_version="$(awk '/^appVersion:/ { print $2; exit }' "${chart_path}")"
current_app_version="${current_app_version#v}"
echo "app_version=${app_version}" >> "${GITHUB_OUTPUT}"
if [ "${current_app_version}" = "${app_version}" ]; then
echo "skip=true" >> "${GITHUB_OUTPUT}"
echo "Chart already targets Open WebUI ${app_version}"
exit 0
fi
current_chart_version="$(awk '/^version:/ { print $2; exit }' "${chart_path}")"
IFS='.' read -r major minor patch_extra <<< "${current_chart_version}"
patch="${patch_extra%%[-+]*}"
next_chart_version="${major}.${minor}.$((patch + 1))"
perl -0pi -e "s/^version: .*/version: ${next_chart_version}/m; s/^appVersion: .*/appVersion: ${app_version}/m" \
"${chart_path}"
echo "chart_version=${next_chart_version}" >> "${GITHUB_OUTPUT}"
echo "skip=false" >> "${GITHUB_OUTPUT}"
- name: Add Dependency Repos
if: steps.chart.outputs.skip != 'true'
run: |
helm repo add ollama https://otwld.github.io/ollama-helm/
helm repo add open-webui https://helm.openwebui.com/
helm repo add tika https://apache.jfrog.io/artifactory/tika/
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Validate chart
if: steps.chart.outputs.skip != 'true'
run: |
helm dependency build ./charts/open-webui
helm lint ./charts/open-webui
helm package ./charts/open-webui --destination /tmp/open-webui-chart
helm template open-webui ./charts/open-webui \
--namespace test-namespace \
--set ollama.enabled=false \
--set ollama.service.port=11434 \
--set pipelines.enabled=false \
--set tika.enabled=false \
--set redis-cluster.enabled=false \
--set postgresql.enabled=false \
| grep -q "image: ghcr.io/open-webui/open-webui:${{ steps.chart.outputs.app_version }}"
- name: Create pull request
if: steps.chart.outputs.skip != 'true'
uses: peter-evans/create-pull-request@v7
with:
branch: automation/open-webui-${{ steps.chart.outputs.app_version }}
commit-message: "chore(open-webui): upgrade open-webui to v${{ steps.chart.outputs.app_version }}"
title: "chore(open-webui): upgrade open-webui to v${{ steps.chart.outputs.app_version }}"
body: |
Updates the Open WebUI Helm chart for the published Open WebUI release.
- Open WebUI app version: `${{ steps.chart.outputs.app_version }}`
- Chart version: `${{ steps.chart.outputs.chart_version }}`