-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (56 loc) · 1.69 KB
/
Copy pathdeploy.yml
File metadata and controls
69 lines (56 loc) · 1.69 KB
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
name: Build and push the build to production in CS Azure
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_push_image:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ${{ secrets.ACR_NAME }}
username: ${{ secrets.ACR_LOGIN }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Build and push images
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}"
file: Dockerfile
tags: ${{secrets.ACR_NAME}}/gradeboost:latest
push: true
secrets: |
ENVIRONMENT_SECRETS=${{ secrets.ENVIRONMENT_SECRETS }}
deploy:
runs-on: ubuntu-22.04
needs: build_push_image
steps:
- uses: actions/checkout@v4
- name: Install Helm
uses: Azure/setup-helm@v3
with:
version: latest
- name: Azure Login with Credentials
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Azure AKS Set Context
uses: Azure/aks-set-context@v3
with:
resource-group: ${{ secrets.AKS_RESOURCE_GROUP }}
cluster-name: ${{ secrets.AKS_CLUSTER_NAME }}
# - name: Run Helm Deploy
# run: |
# helm upgrade \
# --install \
# --create-namespace \
# --atomic \
# --wait \
# --namespace production \
# gradeboost \
# ./kubernetes/gradeboost