From a91fe374f083e99a1f35bd876cb2ec14127bb7b1 Mon Sep 17 00:00:00 2001 From: jay-bisonai <137759552+jay-bisonai@users.noreply.github.com> Date: Fri, 9 Feb 2024 23:21:14 +0900 Subject: [PATCH] feat: Stop workflow when lint returned ERROR --- .github/workflows/ci.helm-lint.yaml | 30 ++++------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.helm-lint.yaml b/.github/workflows/ci.helm-lint.yaml index 1a64b6a4..e37345f0 100644 --- a/.github/workflows/ci.helm-lint.yaml +++ b/.github/workflows/ci.helm-lint.yaml @@ -22,31 +22,9 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Set up Helm - uses: azure/setup-helm@v3 + - name: Run Helm lint + uses: WyriHaximus/github-action-helm3@v3 with: - version: v3.12.1 - - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - check-latest: true - - - name: Setup chart-testing - uses: helm/chart-testing-action@v2.6.0 - - - name: List changed helm charts - id: list-changed - run: | - set -e - changed=$(ct list-changed --target-branch i-56/feat/ci-helm-lint) - echo "ct output: $changed" - if [[ -n "$changed" ]]; then - echo "true" - fi - - - name: Run Helm lint to changed charts - if: steps.list-changed.outputs.changed == 'true' - run: ct lint --target-branch i-56/feat/ci-helm-lint + exec: find . -name 'Chart.yaml' -exec dirname {} \; | xargs -I {} helm lint {} | tee /dev/fd/2 | grep "\[ERROR\]" && exit 1 || exit 0