helm_ci.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: "helm: lint and test charts"
  2. on:
  3. push:
  4. branches: [ master ]
  5. paths: ['k8s/**']
  6. pull_request:
  7. branches: [ master ]
  8. paths: ['k8s/**']
  9. permissions:
  10. contents: read
  11. jobs:
  12. lint-test:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
  17. with:
  18. fetch-depth: 0
  19. - name: Set up Helm
  20. uses: azure/setup-helm@v3
  21. with:
  22. version: v3.10.0
  23. - uses: actions/setup-python@v4
  24. with:
  25. python-version: '3.9'
  26. check-latest: true
  27. - name: Set up chart-testing
  28. uses: helm/chart-testing-action@v2.4.0
  29. - name: Run chart-testing (list-changed)
  30. id: list-changed
  31. run: |
  32. changed=$(ct list-changed --chart-dirs k8s/charts)
  33. if [[ -n "$changed" ]]; then
  34. echo "::set-output name=changed::true"
  35. fi
  36. - name: Run chart-testing (lint)
  37. run: ct lint --all --validate-maintainers=false --chart-dirs k8s/charts
  38. - name: Create kind cluster
  39. uses: helm/kind-action@v1.8.0
  40. - name: Run chart-testing (install)
  41. run: ct install --all --chart-dirs k8s/charts