From ef64da49c5db2c881d3e8d7b8177312c6d35f3e1 Mon Sep 17 00:00:00 2001 From: Michael Levin Date: Wed, 21 Feb 2024 09:19:04 -0500 Subject: [PATCH] Use env vars correctly in deploy workflow --- .github/workflows/deploy.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 44eabfc..69635cf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,17 @@ on: required: true NEW_RELIC_LICENSE_KEY: +env: + APP_NAME: ${{ inputs.APP_NAME }} + DB_NAME: ${{ inputs.DB_NAME }} + NEW_RELIC_APP_NAME: ${{ inputs.NEW_RELIC_APP_NAME }} + ORGANIZATION_NAME: ${{ inputs.ORGANIZATION_NAME }} + SPACE_NAME: ${{ inputs.SPACE_NAME }} + CF_USERNAME: ${{ secrets.CF_USERNAME }} + CF_PASSWORD: ${{ secrets.CF_PASSWORD }} + API_DATA_GOV_SECRET: ${{ secrets.API_DATA_GOV_SECRET }} + NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} + jobs: deploy_api: runs-on: ubuntu-latest @@ -74,6 +85,6 @@ jobs: cf login -u $CF_USERNAME -p $CF_PASSWORD -o $ORGANIZATION_NAME -s $SPACE_NAME cat manifest.yml cf push -f "./manifest.yml" - cf set-env analytics-reporter-api-develop API_DATA_GOV_SECRET "$API_DATA_GOV_SECRET" - cf restage analytics-reporter-api-develop + cf set-env $APP_NAME API_DATA_GOV_SECRET "$API_DATA_GOV_SECRET" + cf restage $APP_NAME cf logout