Skip to content

Commit 0b15816

Browse files
committed
fixes
1 parent 6cbdb04 commit 0b15816

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/actions/setup-environment/action.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,19 @@ runs:
1919
gem install cpflow -v 4.1.0
2020
cpflow --version
2121
22-
- name: cpln profile
22+
- name: Setup Control Plane Profile
2323
shell: bash
2424
run: |
25-
cpln profile update default
25+
if [ -z "$CPLN_TOKEN" ]; then
26+
echo " Error: CPLN_TOKEN environment variable is not set"
27+
exit 1
28+
fi
29+
30+
if [ -z "$CPLN_ORG" ]; then
31+
echo " Error: CPLN_ORG environment variable is not set"
32+
exit 1
33+
fi
34+
35+
echo "Setting up Control Plane profile..."
36+
echo "Organization: $CPLN_ORG"
37+
cpln profile update default --org "$CPLN_ORG" --token "$CPLN_TOKEN"

.github/workflows/deploy-to-control-plane-review.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ concurrency:
1313

1414
env:
1515
APP_NAME: qa-react-webpack-rails-tutorial-pr-${{ github.event.pull_request.number || github.event.issue.number }}
16-
CPLN_ORG: ${{ secrets.CPLN_ORG }}
16+
CPLN_ORG: ${{ secrets.CPLN_ORG_STAGING }}
17+
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}
1718
PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
1819

1920
jobs:
@@ -51,6 +52,9 @@ jobs:
5152
- name: Deploy to Control Plane
5253
id: deploy
5354
uses: ./.github/actions/deploy-to-control-plane
55+
env:
56+
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}
57+
CPLN_ORG: ${{ secrets.CPLN_ORG_STAGING }}
5458
with:
5559
app_name: ${{ env.APP_NAME }}
5660
org: ${{ env.CPLN_ORG }}

0 commit comments

Comments
 (0)