From c5496411f257a41d1e47de178285dfa0302e029c Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Tue, 7 Dec 2021 14:50:45 +0000 Subject: [PATCH] Single env var --- .github/workflows/pipeline.yml | 6 ++---- config/environments/production.rb | 2 +- config/environments/sandbox.rb | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 52953decf..6aab30e77 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -106,8 +106,7 @@ jobs: APP_NAME: dluhc-core CORE_EMAIL_USERNAME: ${{ secrets.CORE_EMAIL_USERNAME }} CORE_EMAIL_PASSWORD: ${{ secrets.CORE_EMAIL_PASSWORD }} - SANDBOX_HOST: ${{ secrets.SANDBOX_HOST }} - PRODUCTION_HOST: ${{ secrets.PRODUCTION_HOST }} + APP_HOST: ${{ secrets.APP_HOST }} run: | cf7 api $CF_API_ENDPOINT cf7 auth @@ -116,6 +115,5 @@ jobs: cf7 set-env $APP_NAME API_KEY $API_KEY cf7 set-env $APP_NAME CORE_EMAIL_USERNAME $CORE_EMAIL_USERNAME cf7 set-env $APP_NAME CORE_EMAIL_PASSWORD $CORE_EMAIL_PASSWORD - cf7 set-env $APP_NAME SANDBOX_HOST $SANDBOX_HOST - cf7 set-env $APP_NAME PRODUCTION_HOST $PRODUCTION_HOST + cf7 set-env $APP_NAME APP_HOST $APP_HOST cf7 push --strategy rolling diff --git a/config/environments/production.rb b/config/environments/production.rb index d9de907da..dcb239817 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -58,7 +58,7 @@ Rails.application.configure do config.action_mailer.perform_caching = false - config.action_mailer.default_url_options = { host: ENV['PRODUCTION_HOST'], port: 3000 } + config.action_mailer.default_url_options = { host: ENV['APP_HOST'], port: 3000 } # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. diff --git a/config/environments/sandbox.rb b/config/environments/sandbox.rb index bfd72fce4..dcb239817 100644 --- a/config/environments/sandbox.rb +++ b/config/environments/sandbox.rb @@ -58,7 +58,7 @@ Rails.application.configure do config.action_mailer.perform_caching = false - config.action_mailer.default_url_options = { host: ENV['SANDBOX_HOST'], port: 3000 } + config.action_mailer.default_url_options = { host: ENV['APP_HOST'], port: 3000 } # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors.