Skip to content

Update server.yml

Update server.yml #57

Workflow file for this run

name: Deploy Server to k8s
on:
workflow_dispatch:
push:
branches:
- main
# paths:
# - 'server/**'
jobs:
build:
environment: k8deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Az CLI login'
uses: azure/login@v1
with:
client-id: ${{ fromJSON(secrets.AZURE_CREDENTIALS_OIDC).clientId }}
tenant-id: ${{ fromJSON(secrets.AZURE_CREDENTIALS_OIDC).tenantId }}
subscription-id: ${{ fromJSON(secrets.AZURE_CREDENTIALS_OIDC).subscriptionId }}
- name: Login to ACR via OIDC
run: az acr login --name ${{ secrets.CONTAINER_REGISTRY }}
- uses: azure/[email protected]
with:
cluster-name: ${{ secrets.CLUSTER_NAME }}
resource-group: ${{ secrets.RESOURCE_GROUP }}
- name: Build and rollout to CI
working-directory: ./server
run: |
docker build . \
-t ${{ secrets.CONTAINER_REGISTRY }}/vaxxlink:$GITHUB_SHA \
-t ${{ secrets.CONTAINER_REGISTRY }}/vaxxlink:latest
docker push ${{ secrets.CONTAINER_REGISTRY }}/vaxxlink
kubectl -n vaxxlink rollout restart deployment/vaxxlink