Skip to content

Commit 84c8be0

Browse files
committed
CCM-11938: try remote
1 parent 2bcf9ae commit 84c8be0

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

.github/workflows/manual-proxy-environment-deploy.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- feature/CCM-11938_workflow
7+
78
workflow_dispatch:
89
inputs:
910
version:
@@ -38,7 +39,7 @@ jobs:
3839
run: npm ci
3940
shell: bash
4041

41-
- name: "Check if pull request exists for this branch"
42+
- name: "Check if pull request exists for this branch and set ENVIRONMENT/APIM_ENV"
4243
id: pr_exists
4344
env:
4445
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -53,34 +54,30 @@ jobs:
5354
echo "Pull request exists: #$pr_number"
5455
echo "does_pull_request_exist=true" >> $GITHUB_OUTPUT
5556
echo "pr_number=$pr_number" >> $GITHUB_OUTPUT
57+
APIM_ENV="${{ inputs.environment }}-pr"
5658
else
5759
echo "Pull request doesn't exist"
5860
echo "does_pull_request_exist=false" >> $GITHUB_OUTPUT
5961
echo "pr_number=" >> $GITHUB_OUTPUT
62+
APIM_ENV="${{ inputs.environment }}"
6063
fi
6164
62-
- name: Set APIM_ENV
63-
shell: bash
64-
env:
65-
ENVIRONMENT: ${{ inputs.environment }}
66-
PR_NUMBER: ${{ steps.pr_exists.outputs.pr_number }}
67-
run: |
68-
if [ -z "$PR_NUMBER" ]; then
69-
echo "APIM_ENV=$ENVIRONMENT" >> $GITHUB_ENV
65+
if [ -z "${{ inputs.environment }}" ]; then
66+
ENVIRONMENT="internal-dev"
7067
else
71-
echo "APIM_ENV=${ENVIRONMENT}-pr" >> $GITHUB_ENV
68+
ENVIRONMENT="${{ inputs.environment }}"
7269
fi
70+
echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_ENV
71+
echo "APIM_ENV=$APIM_ENV" >> $GITHUB_ENV
7372
- name: Build environment oas
7473
working-directory: .
7574
shell: bash
76-
env:
77-
APIM_ENV: ${{ env.APIM_ENV }}
7875
run: make build-json-oas-spec APIM_ENV=$APIM_ENV
7976
- name: "Build proxies"
8077
uses: ./.github/actions/build-proxies
8178
with:
8279
version: "${{ inputs.version }}"
83-
environment: "${{ inputs.environment }}"
80+
environment: "${{ env.ENVIRONMENT }}"
8481
apimEnv: "${{ env.APIM_ENV }}"
8582
runId: "${{ github.run_id }}"
8683
buildSandbox: false

0 commit comments

Comments
 (0)