helm_ci.yml 1.4 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@9bb56186c3b09b4f86b1c65136769dd318469633
  17. with:
  18. fetch-depth: 0
  19. - name: Set up Helm
  20. uses: azure/setup-helm@v4
  21. with:
  22. version: v3.10.0
  23. - uses: actions/setup-python@v5
  24. with:
  25. python-version: '3.9'
  26. check-latest: true
  27. - name: Set up chart-testing
  28. uses: helm/chart-testing-action@v2.6.1
  29. - name: Run chart-testing (list-changed)
  30. id: list-changed
  31. run: |
  32. changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --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 --target-branch ${{ github.event.repository.default_branch }} --all --validate-maintainers=false --chart-dirs k8s/charts
  38. - name: Create kind cluster
  39. uses: helm/kind-action@v1.10.0
  40. - name: Run chart-testing (install)
  41. run: ct install --target-branch ${{ github.event.repository.default_branch }} --all --chart-dirs k8s/charts