-
Notifications
You must be signed in to change notification settings - Fork 31
32 lines (28 loc) · 1.02 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
name: Deploy Health Wallet Demo master branch to ci
# Basics from https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/github-actions
on:
push:
branches:
- master
jobs:
build-demo-wallet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: azure/docker-login@v1
with:
login-server: ${{ secrets.CONTAINER_REGISTRY }}
username: ${{ fromJSON(secrets.AZURE_CREDENTIALS).clientId }}
password: ${{ fromJSON(secrets.AZURE_CREDENTIALS).clientSecret }}
- uses: azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: ${{ secrets.CLUSTER_NAME }}
resource-group: ${{ secrets.RESOURCE_GROUP }}
- name: Build and rollout to CI
run: |
docker build . \
-t ${{ secrets.CONTAINER_REGISTRY }}/siop:$GITHUB_SHA \
-t ${{ secrets.CONTAINER_REGISTRY }}/siop:latest
docker push ${{ secrets.CONTAINER_REGISTRY }}/siop
kubectl -n siop rollout restart deployment/siop