forked from microsoft/python-sample-vscode-flask-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.38 KB
/
Copy pathmain.yml
File metadata and controls
47 lines (40 loc) · 1.38 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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: Azure/docker-login@v1
with:
login-server: SMTestCR1.azurecr.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build . -t SMTestCR1.azurecr.io/k8sdemo:${{ github.sha }}
docker push SMTestCR1.azurecr.io/k8sdemo:${{ github.sha }}
- name: Set Context for Azure Kubernetes Cluster using azure/aks-set-context@v1 action
uses: azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: SMTestCluster14
resource-group: SMResourceGroup
- uses: Azure/k8s-create-secret@v1
with:
container-registry-url: SMTestCR1.azurecr.io
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
secret-name: demo-k8s-secret
- uses: azure/k8s-bake@v1
with:
renderEngine: 'helm2'
helmChart: './charts/'
releaseName: aksappupdemo
id: bake
- uses: Azure/k8s-deploy@v1
with:
manifests: ${{ steps.bake.outputs.manifestsBundle }}
images: |
SMTestCR1.azurecr.io/k8sdemo:${{ github.sha }}
imagepullsecrets: |
demo-k8s-secret