From 23ed48d0811b8b2f4d778f46bc41617a5a084164 Mon Sep 17 00:00:00 2001 From: faucomte97 Date: Tue, 9 Apr 2024 11:41:02 +0100 Subject: [PATCH] Add dotdigital auth env var --- .github/actions/deploy_gcloud/action.yml | 4 ++++ .github/workflows/deploy_default.yml | 1 + .github/workflows/deploy_dev.yml | 1 + .github/workflows/deploy_staging.yml | 1 + app.yaml.tmpl | 1 + django_site/settings.py | 1 + 6 files changed, 9 insertions(+) diff --git a/.github/actions/deploy_gcloud/action.yml b/.github/actions/deploy_gcloud/action.yml index 1935285..7a721fa 100644 --- a/.github/actions/deploy_gcloud/action.yml +++ b/.github/actions/deploy_gcloud/action.yml @@ -58,6 +58,9 @@ inputs: dotmailer-default-preferences: description: Dotmailer default preferences required: true + dotdigital-auth: + description: Dotdigital access key + required: true recaptcha-public-key: description: Recaptcha public key required: true @@ -251,6 +254,7 @@ runs: DOTMAILER_USER: ${{ inputs.dotmailer-user }} DOTMAILER_PASSWORD: ${{ inputs.dotmailer-password }} DOTMAILER_DEFAULT_PREFERENCES: ${{ inputs.dotmailer-default-preferences }} + DOTDIGITAL_AUTH: ${{ inputs.dotdigital-auth }} RECAPTCHA_PUBLIC_KEY: ${{ inputs.recaptcha-public-key }} RECAPTCHA_PRIVATE_KEY: ${{ inputs.recaptcha-private-key }} REDIS_IP: ${{ inputs.redis-ip }} diff --git a/.github/workflows/deploy_default.yml b/.github/workflows/deploy_default.yml index 682e933..7604d98 100644 --- a/.github/workflows/deploy_default.yml +++ b/.github/workflows/deploy_default.yml @@ -62,6 +62,7 @@ jobs: dotmailer-user: ${{ secrets.DOTMAILER_USER }} dotmailer-password: ${{ secrets.DOTMAILER_PASSWORD }} dotmailer-default-preferences: ${{ secrets.DOTMAILER_DEFAULT_PREFERENCES }} + dotdigital-auth: ${{ secrets.DOTDIGITAL_AUTH }} recaptcha-public-key: ${{ secrets.RECAPTCHA_PUBLIC_KEY }} recaptcha-private-key: ${{ secrets.RECAPTCHA_PRIVATE_KEY }} redis-ip: ${{ secrets.REDIS_IP }} diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index 6c9c5d9..5b3fc1d 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -76,6 +76,7 @@ jobs: dotmailer-user: ${{ secrets.DOTMAILER_USER }} dotmailer-password: ${{ secrets.DOTMAILER_PASSWORD }} dotmailer-default-preferences: ${{ secrets.DOTMAILER_DEFAULT_PREFERENCES }} + dotdigital-auth: ${{ secrets.DOTDIGITAL_AUTH }} recaptcha-public-key: ${{ secrets.RECAPTCHA_PUBLIC_KEY }} recaptcha-private-key: ${{ secrets.RECAPTCHA_PRIVATE_KEY }} redis-ip: ${{ secrets.REDIS_IP }} diff --git a/.github/workflows/deploy_staging.yml b/.github/workflows/deploy_staging.yml index 39ea37c..5969670 100644 --- a/.github/workflows/deploy_staging.yml +++ b/.github/workflows/deploy_staging.yml @@ -62,6 +62,7 @@ jobs: dotmailer-user: ${{ secrets.DOTMAILER_USER }} dotmailer-password: ${{ secrets.DOTMAILER_PASSWORD }} dotmailer-default-preferences: ${{ secrets.DOTMAILER_DEFAULT_PREFERENCES }} + dotdigital-auth: ${{ secrets.DOTDIGITAL_AUTH }} recaptcha-public-key: ${{ secrets.RECAPTCHA_PUBLIC_KEY }} recaptcha-private-key: ${{ secrets.RECAPTCHA_PRIVATE_KEY }} redis-ip: ${{ secrets.REDIS_IP }} diff --git a/app.yaml.tmpl b/app.yaml.tmpl index 5e3cd92..11bdddc 100644 --- a/app.yaml.tmpl +++ b/app.yaml.tmpl @@ -43,6 +43,7 @@ env_variables: DOTMAILER_USER: '${DOTMAILER_USER}' DOTMAILER_PASSWORD: '${DOTMAILER_PASSWORD}' DOTMAILER_DEFAULT_PREFERENCES: '${DOTMAILER_DEFAULT_PREFERENCES}' + DOTDIGITAL_AUTH: '${DOTDIGITAL_AUTH}' DJANGO_SECRET: '"${DJANGO_SECRET}"' REDIS_IP: '${REDIS_IP}' REDIS_PORT: '${REDIS_PORT}' diff --git a/django_site/settings.py b/django_site/settings.py index f4b5b69..6e6f541 100644 --- a/django_site/settings.py +++ b/django_site/settings.py @@ -38,6 +38,7 @@ DOTMAILER_USER = os.getenv("DOTMAILER_USER", "") DOTMAILER_PASSWORD = os.getenv("DOTMAILER_PASSWORD", "") DOTMAILER_DEFAULT_PREFERENCES = json.loads(os.getenv("DOTMAILER_DEFAULT_PREFERENCES", "[]") or "[]") +DOTDIGITAL_AUTH = os.environ["DOTDIGITAL_AUTH"] REACT_APP_KURONO_BADGES_URL = os.getenv( "REACT_APP_KURONO_BADGES_URL", "https://development-kurono-badges-dot-decent-digit-629.appspot.com"