Skip to content

Deploy Server

Deploy Server #68

Workflow file for this run

name: Deploy Server
on:
workflow_dispatch:
workflow_run:
workflows: ["server-docker-build (AMD)"]
branches: ["main"]
types:
- completed
permissions:
id-token: write
contents: read
env:
IMAGE_NAME: multiwoven/multiwoven-server
jobs:
deploy:
environment: community
runs-on: ["self-hosted","linux","x64"]
steps:
- uses: azure/[email protected]
with:
version: 'latest'
id: install
- name: Azure Login
uses: Azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Setup kubelogin
uses: azure/use-kubelogin@v1
with:
kubelogin-version: 'v0.1.3'
- name: Gets K8s context
uses: azure/aks-set-context@v3
with:
resource-group: ${{ vars.RESOURCE_GROUP }}
cluster-name: ${{ vars.CLUSTER_NAME }}
admin: 'false'
use-kubelogin: 'true'
- name: Deploy server
env:
IMAGE_TAG: ${{ github.sha }}
run: |
helm repo add multiwoven https://multiwoven.github.io/helm-charts
helm upgrade -i --reuse-values multiwoven multiwoven/multiwoven \
--set multiwovenConfig.appRevision=$IMAGE_TAG \
--set multiwovenServer.multiwovenServer.image.repository=$IMAGE_NAME \
--set multiwovenServer.multiwovenServer.image.tag=$IMAGE_TAG \
--set multiwovenWorker.multiwovenWorker.image.repository=$IMAGE_NAME \
--set multiwovenWorker.multiwovenWorker.image.tag=$IMAGE_TAG
on_failure:
environment: community
if: ${{ failure() }}
needs: [ deploy ]
runs-on: ubuntu-latest
steps:
- name: Report error to AppSignal
env:
ACTION: Release
APPSIGNAL_PUSH_API_KEY: ${{ secrets.APPSIGNAL_PUSH_API_KEY }}
MESSAGE: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
NAME: Deploy Server to Community failed
run: |
EPOCH=$(date +%s)
curl -verbose -H \"Content-Type: application/json\" \
-d "{ \"action\": \"$ACTION\", \"timestamp\": $EPOCH, \"namespace\": \"github\", \"error\": { \"name\": $NAME, \"message\": $MESSAGE } }" \
-X POST \
https://appsignal-endpoint.net/errors?api_key=$APPSIGNAL_PUSH_API_KEY