From 8f3a2a5aac76ffa7de7fe6f72d1db293a1616887 Mon Sep 17 00:00:00 2001 From: Marco Lecheler Date: Fri, 6 Nov 2026 23:40:22 +0100 Subject: [PATCH] ci: install only changed charts and skip kind when nothing installable --- .github/workflows/test.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3f80b6a..e231e36 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,11 +29,16 @@ jobs: - name: Run chart-testing (list-changed) id: list-changed + # paperlessngx-ftp-bridge is excluded from install (see below), so a PR + # touching only that chart needs lint but no kind cluster. run: | changed=$(ct list-changed --target-branch main) if [[ -n "$changed" ]]; then echo "changed=true" >> $GITHUB_OUTPUT fi + if [[ -n "$changed" ]] && grep -qvx 'charts/paperlessngx-ftp-bridge' <<<"$changed"; then + echo "installable=true" >> $GITHUB_OUTPUT + fi - name: Run chart-testing (lint) if: steps.list-changed.outputs.changed == 'true' @@ -43,16 +48,20 @@ jobs: --target-branch main - name: Add chart repositories - if: steps.list-changed.outputs.changed == 'true' + if: steps.list-changed.outputs.installable == 'true' run: helm repo add taskmedia https://helm.task.media - name: Create kind cluster uses: helm/kind-action@v1.13.0 - if: steps.list-changed.outputs.changed == 'true' + if: steps.list-changed.outputs.installable == 'true' - name: Run chart-testing (install) - if: steps.list-changed.outputs.changed == 'true' + if: steps.list-changed.outputs.installable == 'true' # paperlessngx-ftp-bridge is excluded: its Service is a hardcoded # LoadBalancer (kind assigns no external IP, so `--wait` would hang) # and its image is built in the bridge repo, not here. - run: ct install --all --chart-dirs charts --excluded-charts paperlessngx-ftp-bridge + run: | + ct install \ + --target-branch main \ + --chart-dirs charts \ + --excluded-charts paperlessngx-ftp-bridge