helm.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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@v2
  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@v1.1
  26. with:
  27. version: v3.4.2
  28. - uses: actions/setup-python@v2
  29. with:
  30. python-version: 3.7
  31. - name: Set up chart-testing
  32. uses: helm/chart-testing-action@v2.0.1
  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. - name: Create kind cluster
  43. uses: helm/kind-action@v1.1.0
  44. if: steps.list-changed.outputs.changed == 'true'
  45. - name: Run chart-testing (install)
  46. run: ct install --config=.github/ci/ct.yaml
  47. release:
  48. runs-on: ubuntu-latest
  49. steps:
  50. - name: Checkout
  51. uses: actions/checkout@v2
  52. with:
  53. fetch-depth: 0
  54. - name: Configure Git
  55. run: |
  56. git config user.name "$GITHUB_ACTOR"
  57. git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
  58. - name: Set up Helm
  59. uses: azure/setup-helm@v1.1
  60. with:
  61. version: v3.4.2
  62. - name: Generate chart
  63. run: |
  64. make helm.generate
  65. - name: Run chart-releaser
  66. uses: helm/chart-releaser-action@v1.2.1
  67. if: github.ref == 'refs/heads/main'
  68. env:
  69. CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
  70. CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}"
  71. with:
  72. charts_dir: deploy/charts
  73. charts_repo_url: https://charts.external-secrets.io