Update build + deploy #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |