@@ -71,21 +71,28 @@ runs:
7171
7272 - name : Build ${{ inputs.apimEnv }} oas
7373 working-directory : .
74+ env :
75+ APIM_ENV : ${{ inputs.apimEnv }}
7476 shell : bash
7577 run : |
76- if [ ${{ inputs.apimEnv }} == "internal-dev-sandbox" ] && [ ${{ inputs.buildSandbox }} == true ]
78+ if [ ${{ env.APIM_ENV }} == "internal-dev-sandbox" ] && [ ${{ inputs.buildSandbox }} == true ]
7779 then
7880 echo "Building sandbox OAS spec"
7981 make build-json-oas-spec APIM_ENV=sandbox
8082 else
8183 echo "Building env specific OAS spec"
82- make build-json-oas-spec APIM_ENV=${{ inputs.apimEnv }}
84+ make build-json-oas-spec APIM_ENV=${{ env.APIM_ENV }}
85+ fi
86+ if [[ $APIM_ENV == *-pr ]]; then
87+ echo "Removing pr suffix from APIM_ENV after building OAS and calling proxygen"
88+ APIM_ENV=$(echo "$APIM_ENV" | sed 's/-pr$//')
89+ echo "APIM_ENV=$APIM_ENV" >> $GITHUB_ENV
8390 fi
8491
8592 - name : Upload OAS Spec
8693 uses : actions/upload-artifact@v4
8794 with :
88- name : ${{ inputs.apimEnv }}-build-output
95+ name : ${{ env.APIM_ENV }}-build-output
8996 path : ./build
9097
9198 - name : Trigger deploy proxy
@@ -101,7 +108,7 @@ runs:
101108 --targetEnvironment "${{ inputs.environment }}" \
102109 --runId "${{ inputs.runId }}" \
103110 --buildSandbox ${{ inputs.buildSandbox }} \
104- --apimEnvironment "${{ inputs.apimEnv }}" \
111+ --apimEnvironment "${{ env.APIM_ENV }}" \
105112 --boundedContext "notify-supplier" \
106113 --targetDomain "$TARGET_DOMAIN" \
107114 --version "${{ inputs.version }}"
0 commit comments