From 6dc083cd7311847dd76cfe8c39ce75e0db8e5531 Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Tue, 3 Sep 2024 17:20:59 +0200 Subject: [PATCH] fix(ci): don't return error if no chart is found --- .github/workflows/get-changed-chart.yaml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/get-changed-chart.yaml b/.github/workflows/get-changed-chart.yaml index 363f1d54d..129dae3e7 100644 --- a/.github/workflows/get-changed-chart.yaml +++ b/.github/workflows/get-changed-chart.yaml @@ -27,24 +27,10 @@ jobs: steps: - id: getChangedChart name: Get changed chart in PR + if: ${{ needs.getChangedCharts.outputs.count == 1 }} run: | set -e set -o pipefail changed='${{ needs.getChangedCharts.outputs.charts }}' - num_changed='${{ needs.getChangedCharts.outputs.count }}' - case "$num_changed" in - 0) - echo "This PR has seemingly no changes to any charts?" - exit 1 - ;; - 1) - ( - echo chart="$(<<<"$changed" jq -r first)" - ) | tee -a "$GITHUB_OUTPUT" - ;; - *) - echo "This PR has changes to multiple charts. Please create individual PRs per chart." >&2 - exit 1 - ;; - esac + echo chart="$(<<<"$changed" jq -r first)" | tee -a "$GITHUB_OUTPUT"