From e9f2a5b2391399ea2b9b6d04be3f9afd61bfe512 Mon Sep 17 00:00:00 2001 From: Olha Yevtushenko Date: Wed, 21 Aug 2024 20:02:55 +0300 Subject: [PATCH] ci: simplify helm workflows --- .github/workflows/helm-lint.yaml | 8 +------- .github/workflows/helm-test.yaml | 12 ++---------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.github/workflows/helm-lint.yaml b/.github/workflows/helm-lint.yaml index a08cb73c..1225211f 100644 --- a/.github/workflows/helm-lint.yaml +++ b/.github/workflows/helm-lint.yaml @@ -36,10 +36,4 @@ jobs: - name: Run chart-testing (lint) run: | - # is there a better way to get the right name for branch? - # for ref.: https://github.com/helm/chart-testing/issues/186#issuecomment-585595379 - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - ct lint --target-branch ${{ github.head_ref }} --config ./charts/ct.yaml - else - ct lint --target-branch ${{ github.ref_name }} --config ./charts/ct.yaml - fi + ct lint --config ./charts/ct.yaml diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index ca0db7da..f4de11a9 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -35,11 +35,7 @@ jobs: - name: Run chart-testing (list-changed) id: list-changed run: | - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - changed=$(ct list-changed --config ./charts/ct.yaml --target-branch ${{ github.head_ref }}) - else - changed=$(ct list-changed --config ./charts/ct.yaml --target-branch ${{ github.ref_name }}) - fi + changed=$(ct list-changed --config ./charts/ct.yaml if [[ -n "$changed" ]]; then echo "changed=true" >> $GITHUB_OUTPUT @@ -52,8 +48,4 @@ jobs: - name: Run chart-testing (install) if: steps.list-changed.outputs.changed == 'true' run: | - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - ct install --target-branch ${{ github.head_ref }} --charts ./charts/ - else - ct install --target-branch ${{ github.ref_name }} --charts ./charts/ - fi + ct install --charts ./charts/