From 7403693da5b95317a1be40fafc2000d4294f590d Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 22 Oct 2023 14:47:00 +0200 Subject: [PATCH] renamed EXIT_AFTER_MIGRATION -> CI_EXIT_AFTER_MIGRATION --- .github/workflows/main.yml | 2 +- server/utils/db.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5147183c..c0c6d603 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: run: go run main.go working-directory: ./server env: - EXIT_AFTER_MIGRATION: "true" + CI_EXIT_AFTER_MIGRATION: "true" DB_DSN: root:super_secret_passw0rd@tcp(localhost:3306)/campus_db?charset=utf8mb4&parseTime=True&loc=Local ENVIRONMENT: dev build: diff --git a/server/utils/db.go b/server/utils/db.go index f89a85eb..59d7bdb4 100644 --- a/server/utils/db.go +++ b/server/utils/db.go @@ -29,7 +29,7 @@ func SetupDB() *gorm.DB { log.WithError(err).Fatal("Failed to migrate database") } - if os.Getenv("EXIT_AFTER_MIGRATION") == "true" { + if os.Getenv("CI_EXIT_AFTER_MIGRATION") == "true" { log.Info("Exiting after migration") os.Exit(0) }