Files
helm-gitea/.gitea/workflows/helm.yaml
T
volker.raschekandCopilot 010256397a fix(ci): build the helm dependencies before linting and testing
The `charts` directory is ignored by git, so a fresh checkout does not contain the postgresql, postgresql-ha and valkey
sub-charts. Locally the workflow appeared to work because `make helm/dependency-update` had populated the directory at
some earlier point.

Without the sub-charts every suite that asserts on a dependency template failed with "document index 0 is out of range"
and "template gitea/charts/postgresql/templates/primary/svc.yaml not exists or not selected in test suite". `helm lint`
was affected for the same reason.

`helm dependency build` is used instead of `helm dependency update`, because `Chart.lock` is committed and the pinned
versions should be resolved reproducibly rather than refreshed on every run.

Co-authored-by: Copilot <copilot@github.com>
2026-09-14 20:32:37 +02:00

42 lines
1.4 KiB
YAML

name: Helm
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches:
- '**'
tags-ignore:
- '**'
workflow_dispatch: {}
jobs:
helm-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: v4.3.0 # renovate: datasource=github-releases depName=helm/helm
- name: Build helm dependencies
run: helm dependency build
- name: Lint helm files
run: |
helm lint --values values.yaml .
helm-unittest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: v4.3.0 # renovate: datasource=github-releases depName=helm/helm
- env:
HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest
name: Install helm-unittest
run: helm plugin install --verify=false --version "${HELM_UNITTEST_VERSION}" https://github.com/helm-unittest/helm-unittest
- name: Build helm dependencies
run: helm dependency build
- name: Execute helm unittests
run: helm unittest --strict --file 'unittests/**/*.yaml' .