Skip to content

Commit e16afd6

Browse files
authored
fix: Games not stopping (#245)
* load kube config in manage.py * try using setup_gke() * setup gke only if running migrations * load a different kube config
1 parent 2b0bd43 commit e16afd6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/actions/deploy_gcloud/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ runs:
162162
exit 1
163163
fi
164164
165-
./manage.py migrate --no-input
166-
167165
envsubst <django_site/kubeconfig.yaml.tmpl >django_site/kubeconfig.yaml
168166
envsubst <app.yaml.tmpl >app.yaml
169167
168+
./manage.py migrate --no-input
169+
170170
gcloud app --quiet deploy app.yaml --project ${APP_ID} --version ${VERSION} --no-promote --no-cache
171171
gcloud app --quiet deploy cron.yaml --project ${APP_ID} --version ${VERSION} --no-promote
172172

manage.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@
99

1010
from django.core.management import execute_from_command_line
1111

12+
# Need to setup GKE if running migrations
13+
if sys.argv[1] == "migrate":
14+
import kubernetes
15+
16+
kubernetes.config.load_kube_config("/home/runner/.kube/config")
17+
1218
execute_from_command_line(sys.argv)

0 commit comments

Comments
 (0)