From cb179f0a9a8313e9fd7b290d89b2ff455546f9de Mon Sep 17 00:00:00 2001 From: Matt Webster Date: Thu, 3 Dec 2020 22:49:38 -0800 Subject: [PATCH] add code version --- .github/workflows/create_prefect_dev.yml | 1 + .github/workflows/create_release_dev.yml | 4 +++- server/api/code/lacity_data_api/config.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_prefect_dev.yml b/.github/workflows/create_prefect_dev.yml index 817a08f5c..723fcb312 100644 --- a/.github/workflows/create_prefect_dev.yml +++ b/.github/workflows/create_prefect_dev.yml @@ -4,6 +4,7 @@ on: branches: - dev - master + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 paths: - 'server/prefect/**' jobs: diff --git a/.github/workflows/create_release_dev.yml b/.github/workflows/create_release_dev.yml index 26054d9ae..663cfaec6 100644 --- a/.github/workflows/create_release_dev.yml +++ b/.github/workflows/create_release_dev.yml @@ -4,6 +4,7 @@ on: branches: - dev - master + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 paths: - 'server/api/**' jobs: @@ -15,7 +16,8 @@ jobs: uses: actions/checkout@v2 - name: Setup environment run: | - echo GITHUB_SHA=${{ github.sha }} >> server/api/.env + echo GITHUB_CODE_VERSION=${{ env.BRANCH_NAME }} >> server/api/.env + echo GITHUB_SHA=${{ github.sha }} >> server/api/.env - name: Build and Push Image to Docker Hub uses: docker/build-push-action@v1 with: diff --git a/server/api/code/lacity_data_api/config.py b/server/api/code/lacity_data_api/config.py index 75f29f814..e9d633992 100644 --- a/server/api/code/lacity_data_api/config.py +++ b/server/api/code/lacity_data_api/config.py @@ -15,7 +15,7 @@ # checking for testing or debug DEBUG = config("DEBUG", cast=bool, default=False) TESTING = config("TESTING", cast=bool, default=False) -STAGE = config("STAGE", default="Development") +STAGE = config("STAGE", default="Local") # getting database configuration DB_DRIVER = config("DB_DRIVER", default="postgresql")