helm.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. name: Helm
  2. on:
  3. push:
  4. branches:
  5. - main
  6. - release-*
  7. paths:
  8. - 'deploy/charts/**'
  9. pull_request:
  10. paths:
  11. - 'deploy/charts/**'
  12. workflow_dispatch: {}
  13. jobs:
  14. lint-and-test:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - name: Checkout
  18. uses: actions/checkout@v3
  19. with:
  20. fetch-depth: 0
  21. - name: Generate chart
  22. run: |
  23. make helm.generate
  24. - name: Set up Helm
  25. uses: azure/setup-helm@v3.3
  26. with:
  27. version: v3.4.2
  28. - uses: actions/setup-python@v4.2.0
  29. with:
  30. python-version: 3.7
  31. - name: Set up chart-testing
  32. uses: helm/chart-testing-action@v2.3.0
  33. - name: Run chart-testing (list-changed)
  34. id: list-changed
  35. run: |
  36. changed=$(ct list-changed --config=.github/ci/ct.yaml)
  37. if [[ -n "$changed" ]]; then
  38. echo "::set-output name=changed::true"
  39. fi
  40. - name: Run chart-testing (lint)
  41. run: ct lint --config=.github/ci/ct.yaml
  42. release:
  43. runs-on: ubuntu-latest
  44. steps:
  45. - name: Checkout
  46. uses: actions/checkout@v3
  47. with:
  48. fetch-depth: 0
  49. - name: Configure Git
  50. run: |
  51. git config user.name "$GITHUB_ACTOR"
  52. git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
  53. - name: Set up Helm
  54. uses: azure/setup-helm@v3.3
  55. with:
  56. version: v3.4.2
  57. - name: Generate chart
  58. run: |
  59. make helm.generate
  60. - name: Run chart-releaser
  61. uses: helm/chart-releaser-action@v1.4.0
  62. if: github.ref == 'refs/heads/main'
  63. env:
  64. CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
  65. CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}"
  66. with:
  67. charts_dir: deploy/charts
  68. charts_repo_url: https://charts.external-secrets.io