Skip to content

Commit e17fad5

Browse files
Fixed target for PRs
1 parent 2004b5e commit e17fad5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/actions/build-proxies/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ runs:
2525
run: |
2626
make publish-oas
2727
28-
- name: Setup Proxy Name
28+
- name: Setup Proxy Name and target
2929
shell: bash
3030
run: |
3131
3232
if [ -z $PR_NUMBER ]
3333
then
3434
echo "INSTANCE=$PROXYGEN_API_NAME" >> $GITHUB_ENV
35+
echo "TARGET=https://suppliers.dev.nhsnotify.national.nhs.uk" >> $GITHUB_ENV
3536
else
37+
echo "TARGET=https://pr$PR_NUMBER.suppliers.dev.nhsnotify.national.nhs.uk" >> $GITHUB_ENV
3638
echo "INSTANCE=$PROXYGEN_API_NAME-PR-$PR_NUMBER" >> $GITHUB_ENV
3739
fi
3840
@@ -52,6 +54,11 @@ runs:
5254
envsubst < ./.github/proxygen-settings.yaml > ${HOME}/.proxygen/settings.yaml
5355
envsubst < ./.github/proxygen-settings.yaml | cat
5456
57+
- name: Set target
58+
shell: bash
59+
run: |
60+
jq --arg newurl "$TARGET" x-nhsd-apim.target.url = $newurl' build/notify-supplier.json > build/notify-supplier_target.json && mv build/notify-supplier_target.json build/notify-supplier.json
61+
5562
5663
- name: Deploy to Internal Dev
5764
shell: bash

0 commit comments

Comments
 (0)