diff --git a/.github/workflows/charts_lint-test.yaml b/.github/workflows/charts_lint-test.yaml new file mode 100644 index 000000000..a9da11a7b --- /dev/null +++ b/.github/workflows/charts_lint-test.yaml @@ -0,0 +1,43 @@ +name: Charts Lint Test + +on: + pull_request: + branches: [main] + paths: + - "charts/**" + +jobs: + chart-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.8.1 + + - uses: actions/setup-python@v4 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: | + # from sub `charts` dir to uplevel dir. + for d in `find . -name charts -type d | sort -r`; do + ct lint --all --debug --chart-dirs=${d#./} + done diff --git a/.github/workflows/charts_test-bazel-remote.yaml b/.github/workflows/charts_test-bazel-remote.yaml index 0208a054d..f8a94b524 100644 --- a/.github/workflows/charts_test-bazel-remote.yaml +++ b/.github/workflows/charts_test-bazel-remote.yaml @@ -27,21 +27,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.1 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - fi - - - name: Run chart-testing (lint) - run: | - # from sub `charts` dir to uplevel dir. - for d in `find . -name charts -type d | sort -r`; do - ct lint --all --debug --chart-dirs=${d#./} - done - - name: Setup Kubernetes uses: engineerd/setup-kind@v0.5.0 with: diff --git a/.github/workflows/charts_test-jenkins.yaml b/.github/workflows/charts_test-jenkins.yaml index 4f45f6aeb..cea573b79 100644 --- a/.github/workflows/charts_test-jenkins.yaml +++ b/.github/workflows/charts_test-jenkins.yaml @@ -27,21 +27,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.1 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - fi - - - name: Run chart-testing (lint) - run: | - # from sub `charts` dir to uplevel dir. - for d in `find . -name charts -type d | sort -r`; do - ct lint --all --debug --chart-dirs=${d#./} - done - - name: Setup Kubernetes uses: engineerd/setup-kind@v0.5.0 with: diff --git a/.github/workflows/charts_test-prow.yaml b/.github/workflows/charts_test-prow.yaml index 852f4f673..94071911a 100644 --- a/.github/workflows/charts_test-prow.yaml +++ b/.github/workflows/charts_test-prow.yaml @@ -27,21 +27,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.1 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - fi - - - name: Run chart-testing (lint) - run: | - # from sub `charts` dir to uplevel dir. - for d in `find . -name charts -type d | sort -r`; do - ct lint --all --debug --chart-dirs=${d#./} - done - - name: Setup Kubernetes uses: engineerd/setup-kind@v0.5.0 with: