helm.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: Helm
  2. on:
  3. push:
  4. tags:
  5. - '*'
  6. paths:
  7. - 'deploy/charts/**'
  8. pull_request:
  9. branches: main
  10. paths:
  11. - 'deploy/charts/**'
  12. jobs:
  13. lint-and-test:
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@v2
  18. with:
  19. fetch-depth: 0
  20. - name: Generate chart
  21. run: |
  22. make crds-to-chart
  23. - name: Set up Helm
  24. uses: azure/setup-helm@v1
  25. with:
  26. version: v3.4.2
  27. - uses: actions/setup-python@v2
  28. with:
  29. python-version: 3.7
  30. - name: Set up chart-testing
  31. uses: helm/chart-testing-action@v2.0.1
  32. - name: Run chart-testing (list-changed)
  33. id: list-changed
  34. run: |
  35. changed=$(ct list-changed --config=.github/ci/ct.yaml)
  36. if [[ -n "$changed" ]]; then
  37. echo "::set-output name=changed::true"
  38. fi
  39. - name: Run chart-testing (lint)
  40. run: ct lint --config=.github/ci/ct.yaml
  41. - name: Create kind cluster
  42. uses: helm/kind-action@v1.1.0
  43. if: steps.list-changed.outputs.changed == 'true'
  44. - name: Run chart-testing (install)
  45. run: ct install --config=.github/ci/ct.yaml