-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (53 loc) · 1.9 KB
/
main.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy to AKS Cluster
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Decrypt large secret
run: ./docker/performance-dev_php/secrets_enc/decrypt.sh
env:
SECRETS_PASSPHRASE: ${{ secrets.SECRETS_PASSPHRASE }}
- uses: Azure/docker-login@v1
with:
login-server: tbsdevacr.azurecr.io
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- run: |
docker build -f ./docker/performance-dev_php/Dockerfile . -t tbsdevacr.azurecr.io/performance-dev_php:${{ github.sha }}
docker push tbsdevacr.azurecr.io/performance-dev_php:${{ github.sha }}
docker build -f ./docker/performance-dev_nginx/Dockerfile . -t tbsdevacr.azurecr.io/performance-dev_nginx:${{ github.sha }}
docker push tbsdevacr.azurecr.io/performance-dev_nginx:${{ github.sha }}
# Set the target AKS cluster.
- uses: Azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: tbs-prod-aks
resource-group: tbs-prod-rg
- uses: Azure/k8s-deploy@v1
with:
manifests: |
kubernetes/performance-dev-php-deployment.yml
kubernetes/performance-dev-php-service.yml
kubernetes/performance-dev-alpha-ingress.yml
images: |
tbsdevacr.azurecr.io/performance-dev_php:${{ github.sha }}
namespace: |
performance
- uses: Azure/k8s-deploy@v1
with:
manifests: |
kubernetes/performance-dev-nginx-configmap.yml
kubernetes/performance-dev-nginx-deployment.yml
kubernetes/performance-dev-nginx-service.yml
images: |
tbsdevacr.azurecr.io/performance-dev_nginx:${{ github.sha }}
namespace: |
performance