Relayground #21
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: "Relayground" | |
on: | |
push: | |
branches: "main" | |
paths: | |
- "packages/relayground/**/*" | |
- "package*.json" | |
workflow_dispatch: | |
jobs: | |
setup: | |
runs-on: ubuntu-20.04 | |
env: | |
reg: "{{ secrets.ACR_REG_PFX}}.azurecr.io" | |
steps: | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "npm" | |
az-login: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Log into docker registry for relayground | |
- uses: Azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.ACR_REG }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
build: | |
runs-on: ubuntu-20.04 | |
needs: [setup] | |
env: | |
appname: "relayground" | |
region: "north central us" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- run: | | |
TAG="${{ secrets.ACR_REG }}/${{env.appname}}:latest" | |
docker build . -t ${TAG} -f containers/${{env.appname}} -o type=docker | |
docker push ${TAG} | |
deploy: | |
needs: [build] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: Azure/k8s-set-context@v1 | |
with: | |
method: kubeconfig | |
kubeconfig: ${{ secrets.KUBECONFIG }} | |
- run: | | |
kubectl apply -f manifests/relayground.yml | |
kubectl apply -f manifests/relayground-balancer.yml |