Skip to content

Workflow file for this run

name: Docker Images to Github Container Registry to Azure Kubernetes Service
on:
push:
branches:
- main
jobs:
github-container-registry:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
run: echo "${{ secrets.TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: pixa-auth-service
run: |
docker build -t ghcr.io/geetu040/pixa-auth-service:latest microservices/auth-service/
docker push ghcr.io/geetu040/pixa-auth-service:latest
- name: pixa-controller-service
run: |
docker build -t ghcr.io/geetu040/pixa-controller-service:latest microservices/controller-service/
docker push ghcr.io/geetu040/pixa-controller-service:latest
- name: pixa-storage-account-service
run: |
docker build -t ghcr.io/geetu040/pixa-storage-account-service:latest microservices/storage-account-service/
docker push ghcr.io/geetu040/pixa-storage-account-service:latest
- name: pixa-storage-monitor-service
run: |
docker build -t ghcr.io/geetu040/pixa-storage-monitor-service:latest microservices/storage-monitor-service/
docker push ghcr.io/geetu040/pixa-storage-monitor-service:latest
- name: pixa-usage-monitor-service
run: |
docker build -t ghcr.io/geetu040/pixa-usage-monitor-service:latest microservices/usage-monitor-service/
docker push ghcr.io/geetu040/pixa-usage-monitor-service:latest
azure-kubernetes-services:
runs-on: ubuntu-latest
needs: [github-container-registry]
steps:
- uses: actions/checkout@v3
- name: Azure login
uses: azure/[email protected]
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
- name: Set up kubelogin for non-interactive login
uses: azure/use-kubelogin@v1
with:
kubelogin-version: "v0.0.25"
- name: Get K8s context
uses: azure/aks-set-context@v3
with:
resource-group: pixa-resource
cluster-name: pixa-cluster
admin: "false"
use-kubelogin: "true"
- name: Deploys application
uses: Azure/k8s-deploy@v4
with:
action: deploy
manifests: |
manifests/storageclass.yaml
manifests/service.yaml
manifests/persistentvolumeclaim.yaml
manifests/deployment.yaml