Skip to content

Commit

Permalink
Use env vars correctly in deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
levinmr committed Feb 21, 2024
1 parent a9a327a commit ef64da4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit ef64da4

Please sign in to comment.