5 Deploy Web App #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 5 Deploy Web App | |
on: [workflow_dispatch] | |
env: | |
CLUSTER_NAME: AKSClsuter-Demo | |
AZURE_RG: oa-poc-rg | |
NAMESPACE: appconfig | |
IMAGE_NAME: oawebappconfig | |
AZURE_CONTAINER_REGISTRY: ${{ secrets.CONTAINER_REGISTRY }} | |
KUSTOMIZE_PATH: './yaml_files/' | |
TAG: 5141 | |
jobs: | |
deploy-webapp: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
# Set the target AKS cluster. | |
- uses: Azure/aks-set-context@v1 | |
with: | |
creds: '${{ secrets.AZURE_CREDENTIALS }}' | |
cluster-name: ${{ env.CLUSTER_NAME }} | |
resource-group: ${{ env.AZURE_RG }} | |
# Runs Kustomize to create manifest files | |
- name: Bake deployment | |
uses: azure/k8s-bake@v2 | |
with: | |
renderEngine: "kustomize" | |
kustomizationPath: ${{ env.KUSTOMIZE_PATH }} | |
kubectl-version: latest | |
id: bake | |
# Deploys application based on manifest files from previous step | |
- name: Deploy application | |
uses: Azure/k8s-deploy@v4 | |
with: | |
namespace: '${{ env.NAMESPACE }}' | |
action: deploy | |
manifests: ${{ steps.bake.outputs.manifestsBundle }} | |
images: | | |
${{ env.AZURE_CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} | |