You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 KiB

  1. name: "Deploy Helm to AKS"
  2. description: "Deploys a helm chart to AKS"
  3. inputs:
  4. azure_credentials:
  5. description: "Credentials to connect to AKS"
  6. required: true
  7. cluster_name:
  8. description: "Name of AKS cluster"
  9. required: true
  10. resource_group:
  11. description: "Resource group of AKS cluster"
  12. required: true
  13. registry_host:
  14. description: "Image registry host e.g. myacr.azureacr.io"
  15. required: true
  16. chart:
  17. description: "Chart name"
  18. required: true
  19. chart_root:
  20. description: "Root folder of chart"
  21. required: true
  22. namespace:
  23. description: "Namespace to deploy to"
  24. required: true
  25. runs:
  26. using: "composite"
  27. steps:
  28. - uses: azure/login@v1
  29. with:
  30. creds: ${{ inputs.azure_credentials }}
  31. - uses: azure/aks-set-context@v1
  32. name: Set AKS context
  33. with:
  34. creds: '${{ inputs.azure_credentials }}'
  35. cluster-name: ${{ inputs.cluster_name }}
  36. resource-group: ${{ inputs.resource_group }}
  37. - name: Set branch name as env variable
  38. shell: bash
  39. run: |
  40. currentbranch=$(echo ${GITHUB_REF##*/})
  41. echo "running on $currentbranch"
  42. echo "BRANCH=$currentbranch" >> $GITHUB_ENV
  43. - name: Deploy Chart
  44. shell: bash
  45. run: |
  46. ./deploy-chart.sh -c ${{ inputs.chart }} --dns aks --aks-name ${{ inputs.clusteR_name }} --aks-rg ${{ inputs.resource_group }} -r ${{ inputs.registry_host }} -t $TAG --namespace ${{ inputs.namespace }} --acr-connected
  47. env:
  48. TAG: ${{ env.BRANCH }}
  49. working-directory: ${{ inputs.chart_root }}