From dd22935f93d61f60158acc99aee5fb26dcb39e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=E1=B4=87=CA=80=C9=B4=E1=B4=85=20S=E1=B4=84=CA=9C?= =?UTF-8?q?=E1=B4=8F=CA=80=C9=A2=E1=B4=87=CA=80s?= Date: Tue, 29 Mar 2022 10:45:22 +0200 Subject: [PATCH] ci: Update PR validation --- .github/workflows/charts-lint.yaml | 4 ++++ .github/workflows/charts-test.yaml | 4 ++++ .github/workflows/pr-validate.yaml | 2 ++ 3 files changed, 10 insertions(+) diff --git a/.github/workflows/charts-lint.yaml b/.github/workflows/charts-lint.yaml index 426ec51d..bc894d46 100644 --- a/.github/workflows/charts-lint.yaml +++ b/.github/workflows/charts-lint.yaml @@ -6,6 +6,9 @@ on: checkoutCommit: required: true type: string + chartChangesDetected: + required: true + type: string jobs: lint: @@ -34,6 +37,7 @@ jobs: - name: Collect changes id: list-changed + if: inputs.chartChangesDetected == 'true' run: | EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-lint.yaml) CHARTS=$(ct list-changed --config .github/ct-lint.yaml) diff --git a/.github/workflows/charts-test.yaml b/.github/workflows/charts-test.yaml index 4fbf5067..29cc44c8 100644 --- a/.github/workflows/charts-test.yaml +++ b/.github/workflows/charts-test.yaml @@ -6,6 +6,9 @@ on: checkoutCommit: required: true type: string + chartChangesDetected: + required: true + type: string jobs: unit-test: @@ -63,6 +66,7 @@ jobs: - name: Run chart-testing (list-changed) id: list-changed + if: inputs.chartChangesDetected == 'true' run: | EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-install.yaml) CHARTS=$(ct list-changed --config .github/ct-install.yaml) diff --git a/.github/workflows/pr-validate.yaml b/.github/workflows/pr-validate.yaml index 6ec2950e..85875c18 100644 --- a/.github/workflows/pr-validate.yaml +++ b/.github/workflows/pr-validate.yaml @@ -36,6 +36,7 @@ jobs: - charts-changelog with: checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }} + chartChangesDetected: ${{ needs.pr-metadata.outputs.addedOrModified }} charts-test: uses: k8s-at-home/charts/.github/workflows/charts-test.yaml@master @@ -45,3 +46,4 @@ jobs: - charts-lint with: checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }} + chartChangesDetected: ${{ needs.pr-metadata.outputs.addedOrModified }}