Skip to content

Helm application deployment #4

Helm application deployment

Helm application deployment #4

name: Helm application deployment
on:
workflow_dispatch:
inputs:
language:
type: choice
description: Name of the programming language
options:
- golang
application:
type: choice
description: Name of the application
options:
- httpserver
jobs:
helm_deploy:
name: "Deploy App ${{ inputs.application }}-${{ inputs.language }}"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
id: checkout_repo
uses: actions/checkout@v4
- name: Login to Azure
id: login_to_azure
run: |
az login \
--service-principal \
-u ${{ secrets.AZURE_SERVICE_PRINCIPAL_APP_ID }} \
-p ${{ secrets.AZURE_SERVICE_PRINCIPAL_SECRET }} \
--tenant ${{ secrets.AZURE_TENANT_ID }}
- name: Get AKS credentials
id: get_aks_credentials
run: |
az aks get-credentials \
--resource-group "rg${{ secrets.PROJECT }}main${{ secrets.INSTANCE }}" \
--name "aks${{ secrets.PROJECT }}main${{ secrets.INSTANCE }}" \
--overwrite-existing
- name: Install Helm
id: install_helm
uses: azure/setup-helm@v3
with:
version: "v3.11.1"
- name: Deploy Helm chart
id: deploy_helm_chart
run: |
bash ./infra/helm/${{ inputs.application }}/deploy.sh \
--project ${{ secrets.PROJECT }} \
--instance ${{ secrets.INSTANCE }} \
--application ${{ inputs.application }} \
--language ${{ inputs.language }}
- name: Logout of Azure
id: logout_from_azure
if: always()
run: |
az logout