Skip to content

Commit

Permalink
fix: Games not stopping (#245)
Browse files Browse the repository at this point in the history
* load kube config in manage.py

* try using setup_gke()

* setup gke only if running migrations

* load a different kube config
  • Loading branch information
razvan-pro authored Jul 21, 2021
1 parent 2b0bd43 commit e16afd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/deploy_gcloud/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ runs:
exit 1
fi
./manage.py migrate --no-input
envsubst <django_site/kubeconfig.yaml.tmpl >django_site/kubeconfig.yaml
envsubst <app.yaml.tmpl >app.yaml
./manage.py migrate --no-input
gcloud app --quiet deploy app.yaml --project ${APP_ID} --version ${VERSION} --no-promote --no-cache
gcloud app --quiet deploy cron.yaml --project ${APP_ID} --version ${VERSION} --no-promote
Expand Down
6 changes: 6 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@

from django.core.management import execute_from_command_line

# Need to setup GKE if running migrations
if sys.argv[1] == "migrate":
import kubernetes

kubernetes.config.load_kube_config("/home/runner/.kube/config")

execute_from_command_line(sys.argv)

0 comments on commit e16afd6

Please sign in to comment.