Skip to content

Commit

Permalink
feat: Stop workflow when lint returned ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-bisonai committed Feb 9, 2024
1 parent fad9bca commit a91fe37
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/ci.helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Helm
uses: azure/setup-helm@v3
- name: Run Helm lint
uses: WyriHaximus/github-action-helm3@v3
with:
version: v3.12.1

- uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true

- name: Setup chart-testing
uses: helm/[email protected]

- name: List changed helm charts
id: list-changed
run: |
set -e
changed=$(ct list-changed --target-branch i-56/feat/ci-helm-lint)
echo "ct output: $changed"
if [[ -n "$changed" ]]; then
echo "true"
fi
- name: Run Helm lint to changed charts
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch i-56/feat/ci-helm-lint
exec: find . -name 'Chart.yaml' -exec dirname {} \; | xargs -I {} helm lint {} | tee /dev/fd/2 | grep "\[ERROR\]" && exit 1 || exit 0

0 comments on commit a91fe37

Please sign in to comment.