diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index bb2909a..21ab860 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -11,7 +11,7 @@ on: workflow_dispatch: env: - SERVICE_NAME: sso + SERVICE: sso PYTHON_VERSION: 3.8 jobs: @@ -79,22 +79,24 @@ jobs: working-directory: ./backend run: pipenv requirements > requirements.txt + - name: ⚙️ Set Service Name + run: | + echo "SERVICE_NAME=$( + if [ ${{ github.ref_name }} == 'production' ] + then echo ${{ env.SERVICE }} + else echo ${{ github.ref_name }}-${{ env.SERVICE }} + fi + )" >> $GITHUB_ENV + # https://mikefarah.gitbook.io/yq/ - name: 🖊️ Configure App Deployment uses: mikefarah/yq@master with: cmd: | - SERVICE_NAME=$( - if [ ${{ github.ref_name }} == "production" ] - then echo ${{ env.SERVICE_NAME }} - else echo ${{ github.ref_name }}-${{ env.SERVICE_NAME }} - fi - ) - yq -i ' - .service = "${{ github.ref_name }}-${{ env.SERVICE_NAME }}" | - .env_variables.SECRET_KEY = "${{ vars.SECRET_KEY }}" | - .env_variables.SERVICE_NAME = "$SERVICE_NAME" + .service = "${{ github.ref_name }}-${{ env.SERVICE }}" | + .env_variables.SECRET_KEY = "${{ secrets.SECRET_KEY }}" | + .env_variables.SERVICE_NAME = "${{ env.SERVICE_NAME }}" ' backend/app.yaml - name: 🚀 Deploy App on GCloud diff --git a/backend/Pipfile.lock b/backend/Pipfile.lock index b358fa3..dd1bd06 100644 --- a/backend/Pipfile.lock +++ b/backend/Pipfile.lock @@ -155,7 +155,7 @@ }, "codeforlife": { "git": "https://github.com/ocadotechnology/codeforlife-package-python.git", - "ref": "f9e2256e2a6e354907a5c29e225e3944ed45a32e" + "ref": "85cd22c040104bc58172275f1c0a71b842aae78d" }, "codeforlife-portal": { "hashes": [ @@ -816,7 +816,7 @@ "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.2" }, "pytz": { @@ -965,7 +965,7 @@ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.16.0" }, "sortedcontainers": { diff --git a/backend/app.yaml b/backend/app.yaml index c89dca0..9381239 100644 --- a/backend/app.yaml +++ b/backend/app.yaml @@ -1,5 +1,5 @@ runtime: python38 -instance_class: F2 +instance_class: F4 service: REPLACE_ME inbound_services: