Skip to content

Commit ef64da4

Browse files
committed
Use env vars correctly in deploy workflow
1 parent a9a327a commit ef64da4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ on:
2424
required: true
2525
NEW_RELIC_LICENSE_KEY:
2626

27+
env:
28+
APP_NAME: ${{ inputs.APP_NAME }}
29+
DB_NAME: ${{ inputs.DB_NAME }}
30+
NEW_RELIC_APP_NAME: ${{ inputs.NEW_RELIC_APP_NAME }}
31+
ORGANIZATION_NAME: ${{ inputs.ORGANIZATION_NAME }}
32+
SPACE_NAME: ${{ inputs.SPACE_NAME }}
33+
CF_USERNAME: ${{ secrets.CF_USERNAME }}
34+
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
35+
API_DATA_GOV_SECRET: ${{ secrets.API_DATA_GOV_SECRET }}
36+
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
37+
2738
jobs:
2839
deploy_api:
2940
runs-on: ubuntu-latest
@@ -74,6 +85,6 @@ jobs:
7485
cf login -u $CF_USERNAME -p $CF_PASSWORD -o $ORGANIZATION_NAME -s $SPACE_NAME
7586
cat manifest.yml
7687
cf push -f "./manifest.yml"
77-
cf set-env analytics-reporter-api-develop API_DATA_GOV_SECRET "$API_DATA_GOV_SECRET"
78-
cf restage analytics-reporter-api-develop
88+
cf set-env $APP_NAME API_DATA_GOV_SECRET "$API_DATA_GOV_SECRET"
89+
cf restage $APP_NAME
7990
cf logout

0 commit comments

Comments
 (0)