Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: create release

on:
pull_request:
types:
- closed
branches:
- main

run-name: create release from pr number ${{ github.event.number }}
jobs:
create-release:
runs-on: ubuntu-latest

steps:

- name: Token generator
uses: githubofkrishnadhas/github-access-using-githubapp@v2
id: token-generation
with:
github_app_id: ${{ secrets.TOKEN_GENERATOR_APPID }}
github_app_private_key: ${{ secrets.TOKEN_GENERATOR_PRIVATE_KEY }}

- name: Checkout Repository
uses: actions/checkout@v4
with:
token: ${{ steps.token-generation.outputs.token }}

- name: create-release
uses: devwithkrishna/[email protected]
with:
token: ${{ steps.token-generation.outputs.token }}
pr_number: ${{ github.event.number }}
generate_release_notes: true
65 changes: 65 additions & 0 deletions .github/workflows/install-nginx-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: deploy ingress nginx controller to aks cluster
on:
workflow_dispatch:
inputs:
aks_resource_group_name:
type: string
description: The name of the resource group where the AKS cluster is located
default: "DEVWITHKRISHNA-AKS-RG"
required: true
aks_cluster_name:
type: string
description: The name of the AKS cluster
default: "DEVWITHKRISHNA-NONPROD"
required: true

jobs:
deploy-ingress-nginx-controller:
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: azure login
id: azure-login
uses: azure/login@v1
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'

- name: Setup kubectl
id: install-kubectl
uses: azure/setup-kubectl@v3
with:
version: "1.28.3"

- name: Setup helm
id: install-helm
uses: azure/[email protected] # default is latest (stable)

- name: Set AKS context
id: set-context
uses: azure/aks-set-context@v3
with:
resource-group: '${{ inputs.aks_resource_group_name }}'
cluster-name: '${{ inputs.aks_cluster_name }}'

- name: Deploy to AKS
id: deploy-ingress
run: |
echo "Current Cluster Name is: $(kubectl config current-context)"

echo "Installing ingress nginx controller using helm..."

helm upgrade --install ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--namespace ingress-nginx --create-namespace

sleep 10

echo "Checking ingress pods status"

kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=120s
Loading