-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaks-deploy.yml
40 lines (34 loc) · 1.19 KB
/
aks-deploy.yml
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
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: Azure/docker-login@v1
with:
login-server: idansregistry.azurecr.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build . -t idansregistry.azurecr.io/k8sdemo:${{ github.sha }}
docker push idansregistry.azurecr.io/k8sdemo:${{ github.sha }}
# Set the target AKS cluster.
- uses: Azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: devconfaks
resource-group: DevConf
- uses: Azure/k8s-create-secret@v1
with:
container-registry-url: idansregistry.azurecr.io
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
secret-name: demo-k8s-secret
- uses: Azure/k8s-deploy@v1
with:
manifests: |
azure-vote-all-in-one-redis.yml
images: |
idansregistry.azurecr.io/azure-vote-front:${{ github.sha }}
imagepullsecrets: |
demo-k8s-secret