Skip to content

Commit fafac82

Browse files
committed
rework-main-job-deploy-experimental-refactor
1 parent 01d78e0 commit fafac82

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
name: 'Setup Environment'
44
description: 'Sets up Ruby, installs Control Plane CLI, cpflow gem, and sets up the default profile'
55

6+
inputs:
7+
cpln_token:
8+
description: 'Control Plane token'
9+
required: true
10+
cpln_org:
11+
description: 'Control Plane organization'
12+
required: true
13+
614
runs:
715
using: 'composite'
816
steps:
@@ -21,6 +29,9 @@ runs:
2129
2230
- name: Setup Control Plane Profile
2331
shell: bash
32+
env:
33+
CPLN_TOKEN: ${{ inputs.cpln_token }}
34+
CPLN_ORG: ${{ inputs.cpln_org }}
2435
run: |
2536
if [ -z "$CPLN_TOKEN" ]; then
2637
echo " Error: CPLN_TOKEN environment variable is not set"

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
5050
- name: Setup Environment
5151
uses: ./.github/actions/setup-environment
52+
with:
53+
cpln_token: ${{ secrets.CPLN_TOKEN_STAGING }}
54+
cpln_org: ${{ env.CPLN_ORG }}
5255

5356
- name: Deploy to Control Plane
5457
id: deploy
@@ -94,6 +97,9 @@ jobs:
9497
9598
- name: Setup Environment
9699
uses: ./.github/actions/setup-environment
100+
with:
101+
cpln_token: ${{ secrets.CPLN_TOKEN_STAGING }}
102+
cpln_org: ${{ env.CPLN_ORG }}
97103

98104
- name: Get PR Number for Push Event
99105
if: github.event_name == 'push'

0 commit comments

Comments
 (0)