Skip to content

Reset demo

Reset demo #6

Workflow file for this run

name: Reset demo
on:
push:
branches:
- master
workflow_dispatch:
schedule:
- cron: '1,9,17,30,45 6,7,8 * * *'
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT_ID }}
GKE_CLUSTER: mathesar-demo
GKE_ZONE: us-central1
jobs:
reset:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: GCP login
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GKE_DEMO_RESET_SA_KEY }}'
- name: Set up GKE credentials
uses: 'google-github-actions/get-gke-credentials@v0'
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}
- name: Delete existing demo deployment
run: kubectl delete deployments.apps demo-serve
- name: Wait until all pods are removed
run: >-
attempts=10
until [ $attempts -le 0 ] || [ -z "$(kubectl get pods)" ]; do
sleep 5
attempts=$((attempts - 1))
done
if [ $attempts -le 0 ]; then
return 1
fi
- name: Deploy demo
run: kubectl apply -f ./kubernetes_manifests/mathesar-demo.yml