Skip to content

Commit

Permalink
fix(ci): don't return error if no chart is found
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau committed Sep 3, 2024
1 parent 48c8374 commit 6dc083c
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/get-changed-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 6dc083c

Please sign in to comment.