diff --git a/.github/workflows/helm-charts-test.yaml b/.github/workflows/helm-charts-test.yaml index 67b9e2b..ac15083 100644 --- a/.github/workflows/helm-charts-test.yaml +++ b/.github/workflows/helm-charts-test.yaml @@ -59,6 +59,17 @@ jobs: id: postgresql run: | echo ::set-output name=url::$(echo "postgresql://postgres:${{ steps.postgresql_password.outputs.password }}@postgresql-helm-charts-${{ github.run_number }}.default/postgres") + - name: Add WyriHaximusNet repo + run: helm repo add WyriHaximusNet https://helm.wyrihaximus.net/ + - name: Install Chart Tester + uses: helm/chart-testing-action@v2.4.0 + - name: Run List Changed + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi - name: Prepare library charts run: | cp charts/commons/library-ci/*.yaml charts/commons/templates/ @@ -74,9 +85,9 @@ jobs: sed -i 's/library/application/g' charts/horizontal-pod-autoscalers/Chart.yaml rm -Rf charts/commento rm -Rf charts/commentoplusplus - - name: Add WyriHaximusNet repo - run: helm repo add WyriHaximusNet https://helm.wyrihaximus.net/ - - name: Install Chart Tester - uses: helm/chart-testing-action@v2.4.0 - - name: Test charts + - name: Test Changed Charts + if: steps.list-changed.outputs.changed == 'true' run: ct install + - name: Test All Charts + if: steps.list-changed.outputs.changed != 'true' + run: ct install --all