forked from smart-on-fhir/smart-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
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 SMART Launcher master branch to argo.run ci
# Basics from https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/github-actions
on:
push:
branches:
- master
jobs:
build:
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 }}/smart:$GITHUB_SHA \
-t ${{ secrets.CONTAINER_REGISTRY }}/smart:latest
docker push ${{ secrets.CONTAINER_REGISTRY }}/smart
kubectl -n smart rollout restart deployment/smart