From c97a9eec2cc0cefedbb7d498cf65b291259e2c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rodr=C3=ADguez?= <73228905+AntonioRodriguezRuiz@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:17:57 +0100 Subject: [PATCH] config: add workflow to deploy to AKS (#51) --- .github/workflows/deploy-aks.yaml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/deploy-aks.yaml diff --git a/.github/workflows/deploy-aks.yaml b/.github/workflows/deploy-aks.yaml new file mode 100644 index 0000000..05ce988 --- /dev/null +++ b/.github/workflows/deploy-aks.yaml @@ -0,0 +1,35 @@ +name: Deploy to AKS + +on: + workflow_dispatch: + workflow_run: + workflows: + - Build and Push Docker Image + types: + - completed + branches: + - main + +jobs: + deploy: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up KUBECONFIG + uses: azure/k8s-set-context@v4 + with: + kubeconfig: ${{ secrets.KUBECONFIG }} + + - name: Apply manifests + run: | + echo "Apply manifests..." + kubectl apply -f kubernetes/ + + - name: Restart specified deployments + run: | + echo "Restarting api-gateway ..." + kubectl rollout restart deployment api-gateway