-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (62 loc) · 2.47 KB
/
ghcr-to-aks-.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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