File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 4545 shell : bash
4646 run : |
4747
48- ENV="${{ inputs.environment }}"
49- if [[ "$ENV" == "internal-dev" || "$ENV" == pr* ]]; then
48+ ENV="${{ inputs.apimEnv }}"
49+ if [[ "$ENV" == "internal-dev" || "$ENV" == *pr ]]; then
5050 echo "TARGET_DOMAIN=suppliers.dev.nhsnotify.national.nhs.uk" >> $GITHUB_ENV
5151 elif [[ "$ENV" == "int" ]]; then
5252 echo "TARGET_DOMAIN=suppliers.nonprod.nhsnotify.national.nhs.uk" >> $GITHUB_ENV
Original file line number Diff line number Diff line change 11name : Deploy proxy to environment
2- run-name : Proxygen Deployment for ${{ inputs.environment }}
2+ run-name : Proxygen Deployment for ${{ inputs.proxy_environment }}
33
44on :
55 workflow_dispatch :
66 inputs :
7- environment :
8- description : Name of the environment to deploy
7+ proxy_environment :
8+ description : Name of the proxygen environment to deploy to
99 required : true
1010 type : choice
1111 default : internal-dev
@@ -42,10 +42,10 @@ jobs:
4242 branch_name=${GITHUB_HEAD_REF:-$(echo $GITHUB_REF | sed 's#refs/heads/##')}
4343 echo "Current branch is '$branch_name'"
4444
45- if [ -z "${{ inputs.environment }}" ]; then
45+ if [ -z "${{ inputs.proxy_environment }}" ]; then
4646 ENVIRONMENT="internal-dev"
4747 else
48- ENVIRONMENT="${{ inputs.environment }}"
48+ ENVIRONMENT="${{ inputs.proxy_environment }}"
4949 fi
5050
5151 pr_json=$(gh pr list --head "$branch_name" --state open --json number --limit 1)
@@ -59,10 +59,11 @@ jobs:
5959 echo "changing environment variable so that PR number is used in proxy pipeline for setting env vars"
6060 ENVIRONMENT="pr$pr_number"
6161 else
62- echo "Pull request doesn't exist"
62+ echo "Pull request doesn't exist, setting target env to main "
6363 echo "does_pull_request_exist=false" >> $GITHUB_OUTPUT
6464 echo "pr_number=" >> $GITHUB_OUTPUT
6565 APIM_ENV="$ENVIRONMENT"
66+ $ENVIRONMENT='main'
6667 fi
6768
6869 echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments